REFACTOR: deploy_and_set_up_lxc_on_proxmox.yaml works again
This commit is contained in:
@@ -36,13 +36,15 @@
|
|||||||
|
|
||||||
- name: Make the prompted IP available to the whole playbook
|
- name: Make the prompted IP available to the whole playbook
|
||||||
ansible.builtin.set_fact:
|
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
|
- name: Add the target host to the inventory
|
||||||
ansible.builtin.add_host:
|
ansible.builtin.add_host:
|
||||||
name: "{{ fact_lxc_ip_address }}"
|
name: "{{ fact_lxc_ip_address }}"
|
||||||
groups: new_host
|
groups: new_host
|
||||||
ansible_user: ansible
|
ansible_user: ansible
|
||||||
|
ansible_become_password: "{{ ansible_become_passwd }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Configure LXC
|
- name: Configure LXC
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Install basic utils
|
- name: Install basic utils
|
||||||
ansible.builtin.include_tasks: install_basic_utils.yaml
|
ansible.builtin.include_tasks: install_packages.yaml
|
||||||
|
|
||||||
- name: Remove unnecessary packages
|
- name: Remove unnecessary packages
|
||||||
ansible.builtin.include_tasks: remove_packages.yaml
|
ansible.builtin.include_tasks: remove_packages.yaml
|
||||||
|
|||||||
@@ -24,11 +24,13 @@
|
|||||||
mode: u=rwx,g=r,o-rwx
|
mode: u=rwx,g=r,o-rwx
|
||||||
|
|
||||||
# WARNING: UNPRIVILEGED USER (not ansible) COMMANDS
|
# WARNING: UNPRIVILEGED USER (not ansible) COMMANDS
|
||||||
|
# Since the golden image contains installed zsh, this step may not be necessary
|
||||||
- name: Install oh my zsh
|
- name: Install oh my zsh
|
||||||
remote_user: max
|
remote_user: max
|
||||||
become: false
|
become: false
|
||||||
ansible.builtin.command: /home/max/install_omz.sh
|
ansible.builtin.command: /home/max/install_omz.sh
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
- name: Configure oh my zsh, by pushing the config file
|
- name: Configure oh my zsh, by pushing the config file
|
||||||
remote_user: ansible
|
remote_user: ansible
|
||||||
|
|||||||
Reference in New Issue
Block a user