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

2017-07-14 Thread Kai Stian Olstad
On 14. juli 2017 17:56, Anfield wrote: Thanks. So its clear why this didnt work. Can I ask you how I can tell the playbook to switch to root to execute the commands on the localhost with escalated privileges? What is do is adding all the public keys to the ansible configuration and copies it o

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

2017-07-14 Thread Dick Davies
sudo ansible-playbook . will work but then you're running the whole play as local root, which feels wrong. I can't think why you'd want to do that, if you aren't making changes to that host. In this example you're shipping public keys, there's no downside to having them locally (or better st

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

2017-07-14 Thread Anfield
Thanks. So its clear why this didnt work. Can I ask you how I can tell the playbook to switch to root to execute the commands on the localhost with escalated privileges? > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe fro

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

2017-07-12 Thread Gareth Hasson
Actually no, the playbook is running as the ansible user so cannot read those directories Thanks On Wed, Jul 12, 2017 at 2:26 PM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 12. juli 2017 20:11, Anfield wrote: > >> How would I get around this issue on the localhost? I tri

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

2017-07-12 Thread Kai Stian Olstad
On 12. juli 2017 20:11, Anfield wrote: How would I get around this issue on the localhost? I tried adding become_user: root and that didnt work either It must be something with your setup. Does this command work for the same user you are running ansible-playbook with? sudo cat /home/{frank,

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

2017-07-12 Thread Dick Davies
Copy the public keys into the playbook directory. On 12 July 2017 at 19:11, Anfield wrote: > How would I get around this issue on the localhost? I tried adding > become_user: root and that didnt work either > >> > -- You received this message because you are subscribed to the Google Groups "An

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

2017-07-12 Thread Anfield
How would I get around this issue on the localhost? I tried adding become_user: root and that didnt work either > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an ema

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

2017-07-10 Thread Anfield
Good point. The fact the playbook has become: yes in it - does that not apply to the commands that run on the localhost and the target? This playbook is just running against the target 10.10.0.5 Maybe I'm misunderstanding the use of the elevated permissions.. > > -- You received this message

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

2017-07-10 Thread Dick Visser
On 10 July 2017 at 04:39, Anfield wrote: > Yes. Definitely. I even remove the variables in that part, and just put in > /home/dave/.ssh/id_rsa.pub > > Generated the same errors. Permissions perhaps? Keep in mind that you are able to use elevated privileges on the target host, so you have no probl

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

2017-07-09 Thread Anfield
Yes. Definitely. I even remove the variables in that part, and just put in /home/dave/.ssh/id_rsa.pub Generated the same errors. > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails f

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

[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