feat(pb,role,task): generalize names of common pre_tasks and their variables, specifies LXC-specific ones

This commit is contained in:
2026-09-17 11:16:18 +04:00
parent daa5826573
commit f29de42397
6 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -2,11 +2,11 @@
- name: Set default ip
ansible.builtin.set_fact:
lxc_ip_address: "192.168.0.90"
guest_ip_address: "192.168.0.90"
- name: Set default network mask
ansible.builtin.set_fact:
lxc_netmask: "24"
guest_netmask: "24"
- name: Prompt for IP with immediate validation
ansible.builtin.pause:
@@ -20,10 +20,10 @@
- name: Use user input only if provided, otherwise keep the default (IP)
ansible.builtin.set_fact:
lxc_ip_address: "{{ ip_result.user_input.split('/') | first }}"
guest_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 }}"
guest_netmask: "{{ ip_result.user_input.split('/') | second }}"
when: ip_result.user_input | length > 0