diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index f39a5f0..d8915b4 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -1,5 +1,25 @@ --- +# Cannot use the standard, hosts use /etc/ssh/keys/%u +# - name: Add SSH public keys +# authorized_key: +# user: "nschottelius" +# state: present +# key: "{{ item }}" +# with_items: "{{ ssh_keys }}" +# tags: +# - base +# - ssh - name: Add SSH public keys + ansible.builtin.template: + src: authorized_keys.j2 + dest: /etc/ssh/keys/{{ ansible_user }} + owner: root + group: root + mode: '0444' + tags: + - ssh + - base +- name: authorized_key: user: "nschottelius" state: present @@ -8,3 +28,9 @@ tags: - base - ssh +- name: Mount data NFS volume + ansible.posix.mount: + src: 10.165.71.1:/mtx_syna_lat_internal_ru + path: /mnt + state: mounted + fstype: nfs diff --git a/ansible/roles/base/templates/authorized_keys.j2 b/ansible/roles/base/templates/authorized_keys.j2 new file mode 100644 index 0000000..f7bb4d5 --- /dev/null +++ b/ansible/roles/base/templates/authorized_keys.j2 @@ -0,0 +1,3 @@ +{% for item in ssh_keys %} +{{ item }} +{% endfor %}