diff --git a/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml b/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml index 1bbfb32..75a6bf3 100644 --- a/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml +++ b/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml @@ -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 diff --git a/roles/base_system/tasks/main.yaml b/roles/base_system/tasks/main.yaml index 8f5debe..459ff7d 100644 --- a/roles/base_system/tasks/main.yaml +++ b/roles/base_system/tasks/main.yaml @@ -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 diff --git a/roles/human_admin_user/tasks/main.yaml b/roles/human_admin_user/tasks/main.yaml index 8ba891b..19b5b29 100644 --- a/roles/human_admin_user/tasks/main.yaml +++ b/roles/human_admin_user/tasks/main.yaml @@ -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