mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 07:33:52 +02:00
move generating of the known_hosts file to local_action (#425)
This commit is contained in:
parent
87316ea3ea
commit
bf75a1bb03
1 changed files with 5 additions and 4 deletions
|
@ -53,9 +53,6 @@
|
||||||
ssh-keyscan {{ IP_subject_alt_name }} 2>/dev/null
|
ssh-keyscan {{ IP_subject_alt_name }} 2>/dev/null
|
||||||
register: ssh_fingerprints
|
register: ssh_fingerprints
|
||||||
|
|
||||||
- name: The known_hosts file created
|
|
||||||
template: src=known_hosts.j2 dest=/root/.ssh/{{ IP_subject_alt_name }}_known_hosts
|
|
||||||
|
|
||||||
- name: Fetch users SSH private keys
|
- name: Fetch users SSH private keys
|
||||||
fetch: src='/var/jail/{{ item }}/.ssh/id_ecdsa' dest=configs/{{ IP_subject_alt_name }}/{{ item }}.ssh.pem flat=yes
|
fetch: src='/var/jail/{{ item }}/.ssh/id_ecdsa' dest=configs/{{ IP_subject_alt_name }}/{{ item }}.ssh.pem flat=yes
|
||||||
with_items: "{{ users }}"
|
with_items: "{{ users }}"
|
||||||
|
@ -66,7 +63,11 @@
|
||||||
become: false
|
become: false
|
||||||
|
|
||||||
- name: Fetch the known_hosts file
|
- name: Fetch the known_hosts file
|
||||||
fetch: src='/root/.ssh/{{ IP_subject_alt_name }}_known_hosts' dest=configs/{{ IP_subject_alt_name }}/{{ IP_subject_alt_name }}_known_hosts flat=yes
|
local_action:
|
||||||
|
module: template
|
||||||
|
src: known_hosts.j2
|
||||||
|
dest: configs/{{ IP_subject_alt_name }}/known_hosts
|
||||||
|
become: no
|
||||||
|
|
||||||
- name: Build the client ssh config
|
- name: Build the client ssh config
|
||||||
local_action:
|
local_action:
|
||||||
|
|
Loading…
Add table
Reference in a new issue