ansible-rails-deployment icon indicating copy to clipboard operation
ansible-rails-deployment copied to clipboard

"Copy asset files when not changed" creates recursive directory structure

Open kjleitz opened this issue 7 years ago • 3 comments
trafficstars

https://github.com/nicolai86/ansible-rails-deployment/blob/79b8c10658a05d23bccf35698830374f1f592900/tasks/main.yml#L55

- name: copy asset files when not changed
  shell: "cp -R {{ current_path }}/public/assets {{ build_path }}/public/assets"
  when: compile_assets and assets is defined and not assets.changed

For example, given a current_path of some_current_dir/ and a build_path of some_build_dir/, this seems to create a some_build_dir/public/assets/assets (notice that it's nested) linking to some_current_dir/public/assets.

I may be misunderstanding, but isn't this action supposed to link

some_build_dir/public/assets

to

some_current_dir/public/assets

...?

Not to link

some_build_dir/public/assets/assets

to

some_current_dir/public/assets

...?

Thank you for this repo, by the way, it's a huge help!

kjleitz avatar Oct 15 '18 17:10 kjleitz

@nicolai86 while technically this is a question, depending on the answer I think it's more of a bug report—I noticed this behavior in a production app which implemented your pattern a while ago! :)

kjleitz avatar Oct 16 '18 00:10 kjleitz

@kjleitz Yup; I think this should work; I’ll need to dig a little for an old rails app which is deployed via rails - I’ll probably get back to you on the weekend.

I hope this is not blocking you?

nicolai86 avatar Oct 16 '18 05:10 nicolai86

@nicolai86 thank you for asking, but no, not blocking! 😄

kjleitz avatar Oct 16 '18 05:10 kjleitz