deploiement de snowshare
This commit is contained in:
@@ -218,6 +218,29 @@
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
- name: Supprimer l ancienne cle SSH connue
|
||||
known_hosts:
|
||||
name: "{{ lxc_ip_address }}"
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
- name: Scanner la nouvelle cle SSH du LXC
|
||||
command: ssh-keyscan -H {{ lxc_ip_address }}
|
||||
register: lxc_ssh_keyscan
|
||||
changed_when: false
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
- name: Ajouter la nouvelle cle SSH du LXC dans known_hosts
|
||||
known_hosts:
|
||||
name: "{{ lxc_ip_address }}"
|
||||
key: "{{ item }}"
|
||||
state: present
|
||||
loop: "{{ lxc_ssh_keyscan.stdout_lines }}"
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
# Ajout automatique du nouveau LXC dans inventory/hosts.ini.
|
||||
#
|
||||
# blockinfile evite les doublons:
|
||||
|
||||
Reference in New Issue
Block a user