REFACTOR: deploy_and_set_up_lxc_on_proxmox.yaml works again

This commit is contained in:
2026-08-11 08:42:51 +04:00
parent 82fcbf5127
commit 14c0b05bd2
3 changed files with 6 additions and 2 deletions
@@ -36,13 +36,15 @@
- name: Make the prompted IP available to the whole playbook
ansible.builtin.set_fact:
fact_lxc_ip_address: "{{ lxc_ip_address }}"
#fact_lxc_ip_address: "{{ lxc_ip_address | ansible.utils.ipaddr('address') }}"
fact_lxc_ip_address: "{{ lxc_ip_address.split('/') | first }}"
- name: Add the target host to the inventory
ansible.builtin.add_host:
name: "{{ fact_lxc_ip_address }}"
groups: new_host
ansible_user: ansible
ansible_become_password: "{{ ansible_become_passwd }}"
- name: Configure LXC
+1 -1
View File
@@ -1,6 +1,6 @@
---
- name: Install basic utils
ansible.builtin.include_tasks: install_basic_utils.yaml
ansible.builtin.include_tasks: install_packages.yaml
- name: Remove unnecessary packages
ansible.builtin.include_tasks: remove_packages.yaml
+2
View File
@@ -24,11 +24,13 @@
mode: u=rwx,g=r,o-rwx
# WARNING: UNPRIVILEGED USER (not ansible) COMMANDS
# Since the golden image contains installed zsh, this step may not be necessary
- name: Install oh my zsh
remote_user: max
become: false
ansible.builtin.command: /home/max/install_omz.sh
changed_when: true
failed_when: false
- name: Configure oh my zsh, by pushing the config file
remote_user: ansible