summaryrefslogtreecommitdiff
path: root/playbooks
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2025-05-21 07:19:34 +0200
committerjerome <jerome@xlinfo.fr>2025-05-21 07:19:34 +0200
commit833d1215a3cf3a430dc290f0ab585ca765e0092a (patch)
treeadd4192589151d3af4f733d9b55f5fa16aaf65e4 /playbooks
parent6f7b35e304b2ded53dc0ca7e38b35d0630b94e6b (diff)
downloadterraform-ansible-833d1215a3cf3a430dc290f0ab585ca765e0092a.tar.gz
terraform-ansible-833d1215a3cf3a430dc290f0ab585ca765e0092a.zip
script_local
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/lxc.yml18
1 files changed, 9 insertions, 9 deletions
diff --git a/playbooks/lxc.yml b/playbooks/lxc.yml
index 3fb1b18..666cfb3 100644
--- a/playbooks/lxc.yml
+++ b/playbooks/lxc.yml
@@ -55,18 +55,18 @@
shell: "lxc-info -iH debian-lxc"
register: ip_debian
- - name: ssh-keyscan ip debian
- remote_user: "jerome"
- become: no
- local_action: shell ssh-keyscan -H {{ip_debian.stdout}} >> ~/.ssh/known_hosts
-
- - name: ssh-keyscan ip rocky
+ - name: inventaire
remote_user: "jerome"
become: no
- local_action: shell ssh-keyscan -H {{ip_rocky.stdout}} >> ~/.ssh/known_hosts
+ copy:
+ content: "[containers]\n{{ip_rocky.stdout}}\n{{ip_debian.stdout}}"
+ dest: "hosts"
+ delegate_to: localhost
- - name: inventaire
+ - name: ssh-keyscan
remote_user: "jerome"
become: no
- local_action: copy content="[containers]\n{{ip_rocky.stdout}}\n{{ip_debian.stdout}}" dest="hosts"
+ shell:
+ cmd: ssh-keyscan -H -f hosts >> ~/.ssh/known_hosts
+ delegate_to: localhost