feat(pb,role,task): generalize names of common pre_tasks and their variables, specifies LXC-specific ones
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
- name: Set default hostname
|
||||
ansible.builtin.set_fact:
|
||||
lxc_hostname: "new-lxc-test"
|
||||
guest_hostname: "new-lxc-test"
|
||||
|
||||
- name: Prompt for hostname with immediate validation
|
||||
ansible.builtin.pause:
|
||||
@@ -19,5 +19,5 @@
|
||||
|
||||
- name: Use user input only if provided, otherwise keep the default
|
||||
ansible.builtin.set_fact:
|
||||
lxc_hostname: "{{ hostname_result.user_input }}"
|
||||
guest_hostname: "{{ hostname_result.user_input }}"
|
||||
when: hostname_result.user_input | length > 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
- name: Set default human admin user
|
||||
ansible.builtin.set_fact:
|
||||
lxc_human_admin_user: true
|
||||
create_human_admin_user: true
|
||||
|
||||
- name: Prompt for human admin user creation with immediate validation
|
||||
ansible.builtin.pause:
|
||||
@@ -18,5 +18,5 @@
|
||||
|
||||
- name: Use user input only if provided, otherwise keep the default
|
||||
ansible.builtin.set_fact:
|
||||
lxc_human_admin_user: "{{ human_admin_user_result.user_input }}"
|
||||
create_human_admin_user: "{{ human_admin_user_result.user_input }}"
|
||||
when: human_admin_user_result.user_input | length > 0
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user