mise au point
This commit is contained in:
24
solution.txt
24
solution.txt
@@ -1,3 +1,27 @@
|
||||
## Atelier d'introduction
|
||||
|
||||
ansible cibles -u formation -k -m command -a uptime -o
|
||||
|
||||
ansible cibles -u formation -k -m copy -a "src=/etc/profile.d/z_my_profile.sh dest=/etc/profile.d mode=0644 owner=root group=root"
|
||||
|
||||
ansible cibles -u formation -k -m yum -a "name=vim-enhanced state=present"
|
||||
|
||||
ansible cibles -u formation -k -m yum -a "name=nano state=absent"
|
||||
|
||||
|
||||
ansible cibles -u formation -k -m file -a "path=/srv/sib owner=formation state=directory"
|
||||
|
||||
|
||||
ansible cibles -u formation -k -m lineinfile -a "path=/etc/profile.d/editor.sh create=true line='export EDITOR=vim'"
|
||||
|
||||
ansible cibles -u formation -k -m get_url -a "url=https://cours.opendoor.fr/Fichiers/vimrc dest=/etc/vimrc mode=0644"
|
||||
|
||||
|
||||
ansible cibles -u formation -k -m service -a "name=crond state=restarted"
|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user