feat: Use ansible_password variable for LXC password and SSH pass, include vars.yml, and enable Proxmox LXC updates.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
gather_facts: no
|
||||
vars_files:
|
||||
- "../secrets.yml"
|
||||
- "../vars.yml"
|
||||
vars_prompt:
|
||||
- name: container_name
|
||||
prompt: "Enter the new container name (e.g., my-service)"
|
||||
@@ -26,12 +27,13 @@
|
||||
api_user: "{{ proxmox_api_user }}"
|
||||
api_token_id: "{{ proxmox_api_token_id }}"
|
||||
api_token_secret: "{{ proxmox_api_token_secret }}"
|
||||
update: yes
|
||||
node: "{{ proxmox_node }}"
|
||||
storage: "{{ proxmox_storage }}"
|
||||
ostemplate: '{{ proxmox_storage }}:vztmpl/ubuntu-24.04-standard_24.04-2_amd64.tar.zst'
|
||||
vmid: "{{ container_id }}"
|
||||
hostname: "{{ container_name }}"
|
||||
password: "TempPassword123!" # Temporary password, will be disabled by lxc_setup
|
||||
password: "{{ ansible_password }}"
|
||||
netif:
|
||||
net0: "name=eth0,gw=10.0.0.1,ip={{ container_ip_cidr }},bridge=vmbr0"
|
||||
cores: 2
|
||||
@@ -66,7 +68,7 @@
|
||||
groups: new
|
||||
ansible_host: "{{ container_ip_cidr | split('/') | first }}"
|
||||
ansible_user: root
|
||||
ansible_ssh_pass: "TempPassword123!"
|
||||
ansible_ssh_pass: "{{ ansible_password }}"
|
||||
# We need to ignore host key checking for the fresh container to avoid interactive prompt
|
||||
ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user