...
Bloc de code | ||||
---|---|---|---|---|
| ||||
sudo xbps-install -S ansible mkdir -p /etc/ansible cat > /etc/ansible/hosts <<EOF [migration-puppet] host1.ul.local host2.ul.local host3.ul.local host4.ul.local host5.ul.local host6.ul.local EOF # Quelques faire en sorte commandes utiles |
Bloc de code | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||||
# ssh-keyscan -f fichier_liste_de_dns_ou_ip_de_machines_une_par_ligne # À décrire exemple avec un fichier de hosts à la *ansible* time grep -v '^#\|^[[:space:]]*$\|^\[[^]]*\]$' ~/ansible/hosts-def/hosts | ssh-keyscan -H -f - >> ~/.ssh/known_hosts |
Quelques commandes utiles
Bloc de code | ||
---|---|---|
| ||
ansible -i /etc/ansible/hosts migration-puppet -a 'grep "server = " /etc/puppet/puppet.conf' ansible -i /etc/ansible/hosts migration-puppet -a 'sudo rm -rf /var/lib/puppet/ssl' ansible -i /etc/ansible/hosts migration-puppet -a 'sudo puppet agent -t --server=nouveauserver.puppet.local' |
...
- Site web : http://ansible.github.com/