408 commandes partagées

Ta mémoire technique
collaborative

Ne perds plus jamais une commande. Recherche, copie et partage tes solutions techniques en quelques secondes.

CodeBox
408 Commandes
13 Développeurs
99 Technologies

5 résultat(s) pour "state"

Installe un paquet sur des hôtes Debian/Ubuntu.

bash
ansible all -m apt -a "name=nginx state=present" --become

Installe un paquet sur des hôtes CentOS/RHEL.

bash
ansible all -m yum -a "name=nginx state=present" --become

Redémarre un service systemd sur tous les hôtes.

bash
ansible all -m service -a "name=nginx state=restarted" --become

Crée un dossier avec les permissions sur les hôtes distants.

bash
ansible all -m file -a "path=/var/www/mon-app state=directory mode=0755 owner=www-data" --become

Supprime un fichier sur les hôtes distants.

bash
ansible all -m file -a "path=/tmp/fichier-temp.txt state=absent"