|
|
hace 1 año | |
|---|---|---|
| .. | ||
| README.md | hace 1 año | |
| ansible.cfg | hace 1 año | |
| inventory.ini | hace 1 año | |
Contexte :
- On vient d'installer une debian 12.5 sans rien.
- On veut automatiser la création de comptes utilisateurs
Mes deux hosts sur le LAN sont :
Voir ansible-macos-control-node/README.md.
On va utiliser une VM debian comme control node.
Mon control node est 192.168.1.181.
su - (pas encore installé sudo)apt install gnupg curlcurl -o ansible.gpg "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367"gpg --dearmour -o /usr/share/keyrings/ansible-archive-keyring.gpg ansible.gpg (toujours comme root)echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/ansible.listapt updateapt install -y ansibleMIEUX de tout faire en sudo je suppose. On va aussi installer etckeeper.
ansible -i ./inventory.ini all -m ping -u debian
ansible all -m ansible.builtin.setup
inventory.ini avec les deux hosts.Création playbook qui va