8 groups: sudo |
8 groups: sudo |
9 append: true |
9 append: true |
10 register: user |
10 register: user |
11 tags: user |
11 tags: user |
12 |
12 |
13 - name: ssh : Pubkey for user |
13 - name: "ssh : Pubkey for user" |
14 authorized_key: |
14 authorized_key: |
15 manage_dir: true |
15 manage_dir: true |
16 user: "{{user.name}}" |
16 user: "{{user.name}}" |
17 key: "{{item}}" |
17 key: "{{item}}" |
18 with_file: |
18 with_file: |
19 - public_keys/{{user.name}} |
19 - public_keys/{{user.name}} |
20 tags: user, ssh |
20 tags: user, ssh |
21 |
21 |
22 - name: ssh : Ensure known_hosts keys |
22 - name: "ssh : Ensure known_hosts keys" |
23 become: true |
23 become: true |
24 become_user: "{{user.name}}" |
24 become_user: "{{user.name}}" |
25 lineinfile: |
25 lineinfile: |
26 dest: "{{user.home}}/.ssh/known_hosts" |
26 dest: "{{user.home}}/.ssh/known_hosts" |
27 state: present |
27 state: present |