25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- ---
-
- - name: ssh key
- user:
- name: "{{ item }}"
- generate_ssh_key: yes
- ssh_key_type: ed25519
- with_items: "{{ users.keys() }}"
-
- - name: ssh directory
- file:
- path: "{{ users[item].home | default('/home/'+item) }}/.ssh"
- owner: "{{ item }}"
- group: "{{ item }}"
- mode: "700"
- state: directory
- with_items: "{{ users.keys() }}"
-
- - name: ssh authorized keys
- template:
- src: ssh_authorized_keys.j2
- dest: "{{ users[item].home | default('/home/'+item) }}/.ssh/authorized_keys"
- owner: "{{ item }}"
- group: "{{ item }}"
- with_items: "{{ users.keys() }}"
- when: users[item].ssh_authorized_keys is defined
|