Commit 1846a4b8 authored by Rafael Monnerat's avatar Rafael Monnerat

chown the ssh files to the right user

parent 281af5ba
......@@ -3,7 +3,7 @@
file: path=/root/.ssh state=directory mode=700
- name: Create /home/netadmin/.ssh
file: path=/home/netadmin/.ssh state=directory mode=700
file: path=/home/netadmin/.ssh state=directory mode=700 owner=netadmin group=netadmin
- name: Download ssh authorized keys
get_url: url=http://10.0.2.100/authorized_keys dest=/root/.ssh/authorized_keys.download mode=755
......@@ -14,11 +14,11 @@
register: authorized_keys
- name: replace /root/.ssh/authorized_keys
copy: src=/root/.ssh/authorized_keys.download dest=/root/.ssh/authorized_keys mode=755
copy: src=/root/.ssh/authorized_keys.download dest=/root/.ssh/authorized_keys mode=644
when: authorized_keys.stat.exists == True
- name: replace /home/netadmin/.ssh/authorized_keys
copy: src=/root/.ssh/authorized_keys.download dest=/home/netadmin/.ssh/authorized_keys mode=755
copy: src=/root/.ssh/authorized_keys.download dest=/home/netadmin/.ssh/authorized_keys mode=644 owner=netadmin group=netadmin
when: authorized_keys.stat.exists == True
- name: update /etc/ssh/sshd_config
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment