|
|
@ -1,7 +1,8 @@ |
|
|
|
## -- this is all the basic ansible config to ensure it can begin pulling configs down. |
|
|
|
|
|
|
|
## --- firstly, we need our own ssh keys in authorized keys |
|
|
|
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys |
|
|
|
## ++ no longer needed. |
|
|
|
#cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys |
|
|
|
|
|
|
|
## -- add in a couple of keys here, just for backups |
|
|
|
echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3Z5QcAbTioCTWahnGnLmv0Q5NLbBW6UjvPUAQIjGjt2ZtMndiqM5lMGHgu52i3by35vEXfqGweCzAeypgvLKMklWaJVKa0ZlYDZ+BmtovwYDrCLPHEMR3AgxkZKa7dqOrcQNsQ7iFMJ1OJc61eLlBOVEtDDFLzoaUtE1K9tYB86SXRmizNN8zigvb4yCVMG01rNvFvBhCKRItdvmVYtsWff8HYjaTyxwUTJVkrPHyv5H0J1f5S67fI2QjqttrOWVWs331DZ8lREbMxpys9Yx/Ig9zYve76NxDYhp7VeEP+yv8KIKl1YwhMWzrIBMg6I4bnnxQFmQLDLT8uzMHfL9cw== dave@quark.tombstones.org.uk" >> /root/.ssh/authorized_keys |
|
|
@ -11,7 +12,7 @@ echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxF3WIKvNLH7upOzFMI9K6bNXa9nSQg7sxx2 |
|
|
|
chmod 600 /root/.ssh/authorized_keys |
|
|
|
|
|
|
|
## add remote SSH fingerprint for localhost: |
|
|
|
ssh-keyscan -H 127.0.0.1 >> /root/.ssh/known_hosts |
|
|
|
# ssh-keyscan -H 127.0.0.1 >> /root/.ssh/known_hosts |
|
|
|
## .. apparently "localhost" thought it was config.tombstones.org.uk... |
|
|
|
|
|
|
|
|
|
|
@ -43,6 +44,7 @@ cat << EODEP >> /var/lib/ansible-managed/playbook.yaml |
|
|
|
## -- add this in for ansible to be able to self-manage updates |
|
|
|
- name: My first play |
|
|
|
hosts: self |
|
|
|
connection: local |
|
|
|
tasks: |
|
|
|
- name: Ping my hosts |
|
|
|
ansible.builtin.ping: |
|
|
|