From a1e7b0d12727013390a57c5e595b04f38ddc9282 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Tue, 16 Mar 2021 10:59:48 +0100 Subject: [PATCH] =?UTF-8?q?separation=20solution=20/=20=C3=A9nonc=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solution.txt | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 solution.txt diff --git a/solution.txt b/solution.txt deleted file mode 100644 index ed5d993..0000000 --- a/solution.txt +++ /dev/null @@ -1,10 +0,0 @@ -ansible localhost -m openssh_keypair -a "path=/home/formation/.ssh/id_rsa owner=formation group=formation" -u formation - -ansible cibles -u formation -k -m user -a "user=ansible password={{ '123Soleil2020%'| password_hash( 'sha512', 65534 | random( seed=inventory_hostname ) | string ) }} create_home=yes home=/home/ansible" - -ansible cibles -u formation -k -m lineinfile -a "path=/etc/sudoers.d/ansible state=present create=yes line='ansible ALL=(ALL) NOPASSWD: ALL' validate='/usr/sbin/visudo -cf %s'" - -ansible cibles -u formation -k -m copy -a "dest=/etc/sudoers.d/ansible content='ansible ALL=(ALL) NOPASSWD: ALL' validate='/usr/sbin/visudo -cf %s'" - -ansible cibles -u formation -k -m authorized_key -a "key={{ lookup( 'file', '~/.ssh/id_rsa.pub') }} user=ansible" -