[ansible-project] unable to create directory

2017-12-08 Thread coach . rhca
I am trying to clone a git repository using the git clone command but it is unable to create the directory structure and copies the entire files in the parent directory. example when i do the - git: repo=http://pathtothegit/container.git dest=/data/config recursive=yes > it only copies the

Re: [ansible-project] unable to create directory

2017-12-09 Thread Kai Stian Olstad
On Saturday, 9 December 2017 06.14.14 CET coach.r...@gmail.com wrote: > I am trying to clone a git repository using the git clone command but it is > unable to create the directory structure and copies the entire files in the > parent directory. > example when i do the > - git: repo=http://patht

Re: [ansible-project] unable to create directory

2017-12-09 Thread coach rhca
Thanks for replying Kai, if i understand you correctly , git module in anisble doesnot create the parent directory for example if the playbook has the below git play git: repo= git: repo=https://github.com/drush-ops/drush.git dest=/data/gitfiles clone=yes ==> it will not create a drush directory u

Re: [ansible-project] unable to create directory

2017-12-09 Thread Kai Stian Olstad
On Saturday, 9 December 2017 18.20.07 CET coach rhca wrote: > > Thanks for replying Kai, if i understand you correctly , git module in > anisble doesnot create the parent directory for example if the playbook has > the below git play > git: repo= git: repo=https://github.com/drush-ops/drush.git >

Re: [ansible-project] unable to create directory

2017-12-09 Thread coach rhca
thanks again Kai for that insight.. On Sat, Dec 9, 2017 at 11:02 PM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Saturday, 9 December 2017 18.20.07 CET coach rhca wrote: > > > > Thanks for replying Kai, if i understand you correctly , git module in > > anisble doesnot create

Re: [ansible-project] unable to create directory

2017-12-09 Thread coach rhca
also anytime if need to run the clone multiple times then can we use the force command ..to get the updated repo On Sat, Dec 9, 2017 at 11:36 PM, coach rhca wrote: > thanks again Kai for that insight.. > > > > On Sat, Dec 9, 2017 at 11:02 PM, Kai Stian Olstad < > ansible-project+l...@olstad

[ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Shifa Shaikh
Here is my variable file: cat vars.yml --- layers: - name: APP layers: - name: WLS Here is my playbook cat varloop.yml --- hosts: localhost vars_files: - vars.yml tasks: - name: Create sublinks based of bad.txt files include_tasks: "{{ playbook_d

Re: [ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Dick Visser
Hi you've missed a few basic things. The vars file contains a duplicate variable layers - that won't work. Also, you appear to want to loop over the variable layers, but you don't actually use it. Have a look at this URL, it has some nice examples of how loops work: https://docs.ansible.com/ansib

Re: [ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Shifa Shaikh
Dick Hi, The issue is not with the loop as I can see the correct value populated using debug. Aslo, the correct value shows up in the error output from the loop ... see below: fatal: [localhost]: FAILED! => {"changed": false, "msg": "file (/tmp/dashboard/APP state=directory recurse=yes) is ab

Re: [ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Vivek Kothawale
Hi shifa, Can you please check whether dashboard dir is present on remote server? Thanks, Vivek On Mon, Mar 16, 2020, 1:11 PM Shifa Shaikh wrote: > Dick Hi, The issue is not with the loop as I can see the correct value > populated using debug. > > Aslo, the correct value shows up in the error

Re: [ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Dick Visser
Ah OK yes, i see, you're right. The issue is your quoting, as indicated by the error message. Instead of: - file: path="{{ playbook_dir }}/dashboard/{{ my_result.name }} state=directory recurse=yes" Do this: - file: path="{{ playbook_dir }}/dashboard/{{ my_result.name }}" state=directory r

Re: [ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Shifa Shaikh
@Dick your suggestion helped !! it works. On Monday, March 16, 2020 at 1:27:14 PM UTC+5:30, Dick Visser wrote: > > Ah OK yes, i see, you're right. > The issue is your quoting, as indicated by the error message. > Instead of: > >- file: path="{{ playbook_dir }}/dashboard/{{ my_result.name }