From e59a0fb551f7252bc194fafc299db2b94f7bd7ec Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Fri, 29 Mar 2024 02:02:57 +0100 Subject: [PATCH] Update README.md --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 4b6d333..534aa81 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,33 @@ # neuro_ansible Our Ansible files + +# 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 + +useradd -b /specialusers/ ansibleuser +passwd_value="PUT_A_PASSWORD_HERE" +echo ansibleuser:$passwd_value | chpasswd +echo "ansibleuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible +``` + +# 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 +``` +