feat(pb): makes human admin user optional
This commit was merged in pull request #27.
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
default: "sudo"
|
||||
private: false
|
||||
|
||||
- name: vm_create_human_admin_user
|
||||
prompt: "Create human admin user? (true/false)?"
|
||||
default: true
|
||||
private: false
|
||||
|
||||
- name: vm_ip_address
|
||||
prompt: "IP address for the VM (in x.x.x.x/x formant)"
|
||||
default: "192.168.0.89/24"
|
||||
@@ -80,6 +85,10 @@
|
||||
ansible.builtin.set_fact:
|
||||
fact_vm_ip_address: "{{ vm_ip_address.split('/') | first }}"
|
||||
|
||||
- name: Make the "human admin user" selection available to the whole playbook
|
||||
ansible.builtin.set_fact:
|
||||
fact_vm_create_human_admin_user: "{{ vm_create_human_admin_user }}"
|
||||
|
||||
- name: Add the target host to the inventory
|
||||
ansible.builtin.add_host:
|
||||
name: "{{ fact_vm_ip_address }}"
|
||||
@@ -103,7 +112,15 @@
|
||||
- ../roles/configure_ansible_user
|
||||
- ../roles/harden_ssh
|
||||
- ../roles/base_system
|
||||
- ../roles/human_admin_user
|
||||
# Update configs - omz, nvim, ranger and so on. Distribute the last version of those configs
|
||||
- ../roles/update_configs
|
||||
|
||||
tasks:
|
||||
- name: Include human admin user role
|
||||
ansible.builtin.include_role:
|
||||
name: ../roles/human_admin_user
|
||||
when: "hostvars['localhost']['fact_vm_create_human_admin_user'] | bool"
|
||||
|
||||
- name: Include update configs role
|
||||
ansible.builtin.include_role:
|
||||
name: ../roles/update_configs
|
||||
when: "hostvars['localhost']['fact_vm_create_human_admin_user'] | bool"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user