Generate SSH key on Windows
ssh-keygen -b 2048 -t rsa -C "your_username" -f your_username_rsa
ssh-keygen -b 2048 -t rsa -C "your_username" -f your_username_rsa
Coming soon…
Ansible Configuration Cheat Sheet Install sudo apt install ansible SSH key ssh-keygen -t rsa -b 4096 -C "ansible@local" ssh-copy-id root@172.31.71.121 # k8s-cp-01 ssh-copy-id root@172.31.71.122 # k8s-cp-02 ssh-copy-id root@172.31.71.131 # k8s-node-01 ssh-copy-id root@172.31.71.132 # k8s-node-02 ssh-copy-id root@172.31.71.125 ssh-copy-id root@172.31.71.100 [kubernetes_master] k8s-master ansible_host=172.31.71.121 [kubernetes_nodes] k8s-node-01 ansible_host=172.31.71.131 k8s-node-02 ansible_host=172.31.71.132
Clone prepare rm -f /etc/machine-id rm -f /var/lib/dbus/machine-id truncate -s 0 /etc/machine-id rm -f /etc/udev/rules.d/70-persistent-net.rules rm -f /etc/ssh/ssh_host_* apt clean journalctl --vacuum-time=1s rm -rf /var/log/* unset HISTFILE history -c systemctl poweroff Change hostname sudo nano /etc/hostname
Coming soon…
Install Debian create user: ansible disk for var/log Install package: apt update && apt upgrade -y apt install ssh sudo -y Add public key mkdir -p /home/ansible/.ssh echo "ssh-ed25519 xxx ansible-key" > /home/ansible/.ssh/authorized_keys chmod 700 /home/ansible/.ssh chmod 600 /home/ansible/.ssh/authorized_keys chown -R ansible:ansible /home/ansible/.ssh Enable sudoers echo "ansible ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible CleanUP rm -f /etc/machine-id rm -f /var/lib/dbus/machine-id truncate -s 0 /etc/machine-id rm -f /etc/udev/rules.d/70-persistent-net.rules apt clean journalctl --vacuum-time=1s rm -rf /var/log/* unset HISTFILE history -c systemctl poweroff
Coming soon…
Coming soon…