ansible-base/roles/munin_server/tasks/user.yml

23 lines
700 B
YAML
Raw Normal View History

---
- name: Create SSH directory for Munin user
file:
2020-07-11 00:17:08 +02:00
path: "{{ munin_home_directory + '/.ssh' }}"
state: directory
owner: "{{ munin_user }}"
group: "{{ munin_user }}"
mode: '0700'
- name: Deploy private key to access other Munin node
copy:
2020-07-11 00:17:08 +02:00
dest: "{{ munin_home_directory + '/.ssh/id_rsa' }}"
owner: "{{ munin_user }}"
group: "{{ munin_user }}"
mode: '0600'
2020-07-11 00:17:08 +02:00
content: "{{ private_key_munin_user_host }}"
- name: Deploy public key to access other Munin node
copy:
2020-07-11 00:17:08 +02:00
dest: "{{ munin_home_directory + '/.ssh/id_rsa.pub' }}"
owner: "{{ munin_user }}"
group: "{{ munin_user }}"
mode: '0644'
2020-07-11 00:17:08 +02:00
content: "{{ public_key_munin_user_host + '\n' }}"