neuro_ansible/README.md

41 lines
969 B
Markdown
Raw Normal View History

2024-03-29 01:43:28 +01:00
# neuro_ansible
Our Ansible files
2024-03-29 02:02:57 +01:00
# How make a computer ready for ansible
```
dnf -y install ansible mc net-tools openssh-server openssh-clients passwdqc cracklib-dicts shadow-utils
systemctl enable sshd
systemctl start sshd
2024-03-29 20:39:15 +01:00
useradd -b /specialusers ansibleuser
2024-03-29 02:02:57 +01:00
passwd_value="PUT_A_PASSWORD_HERE"
echo ansibleuser:$passwd_value | chpasswd
echo "ansibleuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible
```
2024-04-12 02:36:38 +02:00
## Beware of SELinux
cat /etc/selinux/config | sed s/"$SELINUX=enforcing"/"SELINUX=disabled"/g > /etc/selinux/config_xxx
\cp /etc/selinux/config_xxx /etc/selinux/config
\rm /etc/selinux/config_xxx
reboot
2024-03-29 02:02:57 +01:00
# How to make the server ready
Once:
```
dnf -y install ansible mc net-tools openssh-server openssh-clients passwdqc cracklib-dicts shadow-utils sshpass
ssh-keygen
```
And then for every computer:
```
passwd_value="PUT_A_PASSWORD_HERE"
sshpass -p "$passwd_value" ssh-copy-id -o "StrictHostKeyChecking accept-new" ansibleuser@COMPUTERNAME
```