feat(pb,role,task): completes the LXC deployment workflow using new validation tasks
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
- name: Set default ip
|
||||
ansible.builtin.set_fact:
|
||||
lxc_ip_address: "192.168.0.90/24"
|
||||
lxc_ip_address: "192.168.0.90"
|
||||
|
||||
- name: Set default network mask
|
||||
ansible.builtin.set_fact:
|
||||
lxc_netmask: "24"
|
||||
|
||||
- name: Prompt for IP with immediate validation
|
||||
ansible.builtin.pause:
|
||||
@@ -14,7 +18,12 @@
|
||||
retries: 2
|
||||
delay: 0
|
||||
|
||||
- name: Use user input only if provided, otherwise keep the default
|
||||
- name: Use user input only if provided, otherwise keep the default (IP)
|
||||
ansible.builtin.set_fact:
|
||||
lxc_ip_address: "{{ ip_result.user_input }}"
|
||||
lxc_ip_address: "{{ ip_result.user_input.split('/') | first }}"
|
||||
when: ip_result.user_input | length > 0
|
||||
|
||||
- name: Use user input only if provided, otherwise keep the default (netmask)
|
||||
ansible.builtin.set_fact:
|
||||
lxc_netmask: "{{ ip_result.user_input.split('/') | second }}"
|
||||
when: ip_result.user_input | length > 0
|
||||
|
||||
Reference in New Issue
Block a user