Ansible
Version vom 2. April 2025, 19:06 Uhr von Hamatoma (Diskussion | Beiträge) (→Installation neuer Server)
Links
Zielsetzung
Hilfestellung für die Serververwaltungssoftware Ansible.
Installation neuer Server
STD_USER=wk
HOST=host1.example.com
apt install ansible
adduser $STD_USER
echo "= store the password at a secure place"
adduser --firstuid=260 --firstgid=260 ansadm
echo "= add ansadm to the wheel users without password: ALL=NOPASSWD: ALL"
vi /etc/sudoers
cp /etc/hostname /etc/hostname.orig
echo $HOST >/etc/hostname
reboot
Aktionen auf dem lokalen Rechner
HOST=host1.example.com
sudo sudo -u ansadm -s
ssh-copy-id $HOST
ansible all -a "tail -1 /etc/shadow"