From 639840098b9a937dd0278ddc6ebf013284be7749 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Mon, 19 Apr 2021 12:23:14 +0200 Subject: [PATCH] mise au point solution et renommage fichier --- solution.txt => Readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename solution.txt => Readme.md (83%) diff --git a/solution.txt b/Readme.md similarity index 83% rename from solution.txt rename to Readme.md index 623f7c5..85a1711 100644 --- a/solution.txt +++ b/Readme.md @@ -24,7 +24,8 @@ ansible cibles -u formation -k -m service -a "name=crond state=restarted" 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" +#l'inversion des quotes permet l'utilisation du ! dans le mot de passe +ansible cibles -u formation -k -m user -a 'user=ansible password={{ "123Soleil!"| 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'"