Re: [ansible-project] Playbook Failys atc copying ssh keys

2017-07-08 Thread Dick Davies
It's this part: - name: Copy ths ssh public key into the authorized key dir on the remote host copy src: "/home/{{item}}/.ssh/id_rsa.pub" are the public keys at those paths on the Ansible host? On 8 July 2017 at 19:18, Anfield wrote: > > I have the below playbook. Created ssh keys f

Re: [ansible-project] ansible 2 lists in playbook vars file

2017-07-08 Thread Kai Stian Olstad
On 09. juli 2017 00:09, Anfield wrote: Hi, Thanks for the reponse. This works but I dont quite understand it... So copylist is now basically a list with two listed values - src - src How does it pick up dest when its not really designated as a list item with a dash (-)? I wouldve expe

Re: [ansible-project] ansible 2 lists in playbook vars file

2017-07-08 Thread Mauricio Tavares
On Sat, Jul 8, 2017 at 6:09 PM, Anfield wrote: > Hi, > > Thanks for the reponse. This works but I dont quite understand it... > > So copylist is now basically a list with two listed values >- src >- src > > How does it pick up dest when its not really designated as a list item with > a da

Re: [ansible-project] ansible 2 lists in playbook vars file

2017-07-08 Thread Anfield
Hi, Thanks for the reponse. This works but I dont quite understand it... So copylist is now basically a list with two listed values - src - src How does it pick up dest when its not really designated as a list item with a dash (-)? I wouldve expected -dest to be listed aswell twice --

Re: [ansible-project] ansible 2 lists in playbook vars file

2017-07-08 Thread Kai Stian Olstad
On 08. juli 2017 23:52, Anfield wrote: Trying to get a playbook working with yml file containing 2 lists and passing that into the main file to loop over. Can someone help with letting me know what I'm doing wrong? Thanks copylist.yml --- copylist: src: - /home/ansible/tom/tom.tx

[ansible-project] ansible 2 lists in playbook vars file

2017-07-08 Thread Anfield
Trying to get a playbook working with yml file containing 2 lists and passing that into the main file to loop over. Can someone help with letting me know what I'm doing wrong? Thanks copylist.yml --- copylist: src: - /home/ansible/tom/tom.txt - /home/ansible/fred/fred.txt de

[ansible-project] Playbook Failys atc copying ssh keys

2017-07-08 Thread Anfield
I have the below playbook. Created ssh keys for dave on the localhost (ansible master) and trying to create some users, groups and copy over ssh keys for some users all in the playbook. All works well until the copying over ssh keys part. Ive confirmed the directory and public key exists for d

Re: [ansible-project] Cannot read group_variable from role task - Ansible 2.3.1.0 (works fine with 2.1) -

2017-07-08 Thread Daniel JD
Good thing to remember: Always use curly brackets if you want to access variables, except in in "when"- directives (failed_when, success_when, when). Conditionals are always processed by jinja2 templating. Am Donnerstag, 6. Juli 2017 19:11:24 UTC+2 schrieb Paolo Galizzi: > > I confirm this res

[ansible-project] Re: What traces does Ansible leave on remote hosts and how can I remove them?

2017-07-08 Thread Daniel JD
I forgot to tell you how to change that path :D The option is the following: remote_tmp = ~/.ansible/tmp Am Samstag, 8. Juli 2017 14:19:18 UTC+2 schrieb Daniel JD: > > Ansible should cleanup the files inside that folder. It should be empty! I > dont know a way to completly remove it... > You

[ansible-project] Re: What traces does Ansible leave on remote hosts and how can I remove them?

2017-07-08 Thread Daniel JD
Ansible should cleanup the files inside that folder. It should be empty! I dont know a way to completly remove it... You could change the path to /tmp/.ansible and then it should automatically be cleaned by the OS (because /tmp is a tmpfs which is located in DRAM or if its a normal filesystem, b

Re: [ansible-project] Re: handlers and include files with variables in filenames

2017-07-08 Thread Mauricio Tavares
On Thu, Jul 6, 2017 at 8:59 AM, Jeff Li wrote: > Hope it is clear. > > The directory structure looks like this > > > playbook.yml > vars/main.yml > roles/my-roles/handlers/main.yml > roles/my-roles/handlers/ocata.yml > roles/my-roles/handlers/kilo.yml > > > > The roles/my-roles/handlers/main.yml l