Go to file
2023-03-27 09:33:59 -07:00
ansible Add 'ansible/ubuntu/setup-pb.yml' 2023-03-15 22:06:26 +01:00
.ansible.cfg Add '.ansible.cfg' 2023-03-15 22:00:35 +01:00
config move to ~.ssh/ 2023-03-15 22:29:08 +01:00
README.md Update 'README.md' 2023-03-27 09:33:59 -07:00

setup_new_server

git clone

generate ssh key on target for root

allow root login : PermitRootLogin prohibit-password

add host IP or name to local (ansible machine) /etc/hosts

ansible-vault create passwd.yml or ansible-vault edit passwd.yml

move and edit config to ~.ssh/config

ssh-copy-id to target

test connection: ansible -m ping --ask-vault-pass --extra-vars '@passwd.yml' TARGET_IP OR NAME -u root

run playbook: ansible-playbook --ask-vault-pass --extra-vars '@passwd.yml' ubuntu/setup-pb.yml -l TARGET_IP OR NAME -u root

Reference: https://www.vultr.com/docs/how-to-configure-a-new-ubuntu-server-with-ansible/

modify /etc/sysctl.conf, add the line: net.ipv4.icmp_echo_ignore_all = 1 #don't respond to pings

and then: sudo sysctl -p