From b57f8c54c7c499a4a65de4c4aa4d70471c4f9a13 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Sun, 28 Aug 2022 19:54:17 +0100 Subject: [PATCH] adding updates and readme --- README.md | 17 +++++++++++++++++ ansible.cfg | 1 + hosts.ini | 1 - setup-homelab.yml | 5 +++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 46297a2..abb62df 100644 --- a/README.md +++ b/README.md @@ -1 +1,18 @@ # HomeLab + +An ansible specific private key is used in these playbooks. + +This key can be generated by running + +### Generate the keyfile + +```bash +ssh-keygen -t ed25519 -C "ansible" +``` + + +### Add to authorized host +```bash +# replace the user/hostname with whatever you need to connect to. +ssh-copy-id -i ~/.ssh/ansible.pub cianhatton@qnap +``` diff --git a/ansible.cfg b/ansible.cfg index 992fb32..c8667f5 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -4,3 +4,4 @@ inventory=hosts.ini vault_password_file=.vault-pass.sh host_key_checking = False enable_plugins = linode +private_key_file=~/.ssh/ansible diff --git a/hosts.ini b/hosts.ini index c864d9d..7193ce6 100644 --- a/hosts.ini +++ b/hosts.ini @@ -9,5 +9,4 @@ cianhatton@qnap # BEGIN ANSIBLE MANAGED BLOCK [linode] -root@172.104.8.72 # END ANSIBLE MANAGED BLOCK diff --git a/setup-homelab.yml b/setup-homelab.yml index 85fa07c..3d4d391 100644 --- a/setup-homelab.yml +++ b/setup-homelab.yml @@ -6,6 +6,11 @@ - name: Include vault variables. include_vars: "{{vault_file}}" tags: ["always"] + - name: Update Packages + apt: + upgrade: dist + update_cache: true + tags: ["always"] roles: - role: 'roles/setup_mergerfs'