44 lines
881 B
YAML
44 lines
881 B
YAML
---
|
|
|
|
- name: Create ssh directory
|
|
file:
|
|
path: '.ssh'
|
|
owner: '{{ user.name }}'
|
|
group: '{{ user.name }}'
|
|
mode: 0700
|
|
state: directory
|
|
become_user: '{{ user.name }}'
|
|
|
|
- name: Create ssh configuration file directory
|
|
file:
|
|
path: '.ssh/config.d'
|
|
owner: '{{ user.name }}'
|
|
group: '{{ user.name }}'
|
|
mode: 0755
|
|
state: directory
|
|
become_user: '{{ user.name }}'
|
|
|
|
- name: Deploying config files
|
|
template:
|
|
src: 'config.d/{{ item }}.j2'
|
|
dest: '.ssh/config.d/{{ item }}'
|
|
owner: '{{ user.name }}'
|
|
group: '{{ user.name }}'
|
|
mode: 0644
|
|
loop:
|
|
- aurore
|
|
- crans
|
|
- dptinfo
|
|
- perso
|
|
- virtu
|
|
become_user: '{{ user.name }}'
|
|
|
|
- name: Include config files
|
|
template:
|
|
src: 'config.j2'
|
|
dest: '.ssh/config'
|
|
owner: '{{ user.name }}'
|
|
group: '{{ user.name }}'
|
|
mode: 0644
|
|
become_user: '{{ user.name }}'
|