From deefc70056f63143d9301438344d27f193647ca6 Mon Sep 17 00:00:00 2001 From: Maksym Buz Date: Sun, 4 Jan 2026 12:49:48 +0100 Subject: [PATCH] feat: Enhance LXC creation playbook with SSH key injection and new parameters, introduce Ansible configuration, and adjust script paths and secret variable names. --- ansible.cfg | 3 +++ apt_upgrade.sh | 2 +- example_secrets.yml | 2 +- playbooks/README.md | 11 ++++++----- playbooks/create_lxc.yml | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 ansible.cfg diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..8130425 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] +host_key_checking = False +inventory = inventory/hosts.ini diff --git a/apt_upgrade.sh b/apt_upgrade.sh index 00e88a1..55b56dc 100755 --- a/apt_upgrade.sh +++ b/apt_upgrade.sh @@ -1 +1 @@ -cd /home/mbuz/git/homelab/Ansible/ && ansible-playbook -i inventory/hosts.ini playbooks/apt_upgrade.yml -l ubuntu --extra-vars "@vars.yml" --extra-vars "@secrets.yml" +cd /opt/ansible/ && ansible-playbook -i inventory/hosts.ini playbooks/apt_upgrade.yml -l ubuntu --extra-vars "@vars.yml" --extra-vars "@secrets.yml" diff --git a/example_secrets.yml b/example_secrets.yml index c924705..e4c4142 100644 --- a/example_secrets.yml +++ b/example_secrets.yml @@ -1,7 +1,7 @@ ### Copy this into secrets.yml and replate with a real values ### # Password used for Ansible to connect to LXC as root (if not using SSH keys) -ansible_password: 'REPLACE_WITH_ROOT_PASSWORD' +lxc_root_password: 'REPLACE_WITH_ROOT_PASSWORD' # Zabbix proxy parameters for connecting to Zabbix server zabbix_server_address: 'x.x.x.x' zabbix_psk_identity: '