diff options
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/ssh/tasks/main.yml | 22 | ||||
| -rw-r--r-- | roles/users/tasks/main.yml | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml index 0e2fdbf..24b50da 100644 --- a/roles/ssh/tasks/main.yml +++ b/roles/ssh/tasks/main.yml @@ -23,3 +23,25 @@ name: sshconfig tags: - dotfiles + +- name: Setup SSH directory for Anastasiia Semenova + ansible.builtin.file: + path: /home/a/.ssh + state: directory + owner: a + group: a + mode: u+rw,g-wx,o-rwx + when: inventory_hostname in groups['home'] + tags: + - dotfiles + +- name: Update authorized_keys for Anastasiia Semenova + ansible.posix.authorized_key: + user: a + state: present + key: "{{ lookup('file', item) }}" + with_fileglob: + - misc/pubkeys/a/*.pub + when: inventory_hostname in groups['home'] + tags: + - dotfiles diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index f3df2df..6906823 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -14,3 +14,9 @@ # Group http required to deploy websites with rsync under personal # username. - http + +- name: Create user for Anastasiia Semenova + ansible.builtin.user: + name: a + home: /home/a + when: inventory_hostname in groups['home'] |