add .ssh check
This commit is contained in:
parent
1575a24766
commit
2925005ab8
@ -3,10 +3,20 @@
|
|||||||
package:
|
package:
|
||||||
name: "{{ system_ssh_package }}"
|
name: "{{ system_ssh_package }}"
|
||||||
state: present
|
state: present
|
||||||
|
- name: ensure .ssh exist for user
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: "/home/{{item}}/.ssh"
|
||||||
|
owner: "{{item}}"
|
||||||
|
mode: 0700
|
||||||
|
with_items:
|
||||||
|
- "{{user.name}}"
|
||||||
|
|
||||||
- name: copy ssh config for user
|
- name: copy ssh config for user
|
||||||
become: true
|
become: true
|
||||||
template:
|
template:
|
||||||
dest: "/home/{{ item }}/.ssh"
|
dest: "/home/{{ item }}/.ssh/config"
|
||||||
src: "ssh/config.j2"
|
src: "ssh/config.j2"
|
||||||
force: true
|
force: true
|
||||||
remote_src: false
|
remote_src: false
|
||||||
|
Loading…
Reference in New Issue
Block a user