summaryrefslogtreecommitdiff
path: root/roles/ssh/tasks/main.yml
blob: 24b50da07411909fa2f84fefd53c75b5186574f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
- name: Setup SSH directory for Dmitry Ilvokhin
  ansible.builtin.file:
    path: /home/d/.ssh
    state: directory
    owner: d
    group: d
    mode: u+rw,g-wx,o-rwx
  tags:
    - dotfiles

- name: Update authorized_keys for Dmitry Ilvokhin
  ansible.posix.authorized_key:
    user: d
    state: present
    key: "{{ lookup('file', item) }}"
  with_fileglob:
    - misc/pubkeys/d/*.pub
  tags:
    - dotfiles

- name: Configure ssh for Dmitry Ilvokhin
  ansible.builtin.include_role:
    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