|
83 | 83 | ansible.builtin.include_vars:
|
84 | 84 | file: "{{ __user_config_stat.stat.path }}"
|
85 | 85 |
|
86 |
| -# Admin Password |
87 |
| -- name: Prompt User for a password if not provided in config or vault |
88 |
| - when: admin_password is undefined or admin_password | length < 2 |
89 |
| - block: |
90 |
| - - name: Prompt User for Password if not supplied |
91 |
| - no_log: true |
92 |
| - pause: |
93 |
| - prompt: "No admin password found in profile.yml or extra_vars, or provided password too short; please provide a Password" |
94 |
| - register: __user_input_password |
95 |
| - |
96 |
| - - name: Set Admin password |
97 |
| - no_log: true |
98 |
| - ansible.builtin.set_fact: |
99 |
| - admin_password: "{{ __user_input_password.user_input }}" |
100 |
| - |
101 |
| -- name: Assert user has supplied an Admin Password |
102 |
| - no_log: true |
103 |
| - ansible.builtin.assert: |
104 |
| - quiet: yes |
105 |
| - that: |
106 |
| - - admin_password is defined |
107 |
| - - admin_password | length > 2 |
108 |
| - fail_msg: "You must supply an Admin Password of at least 2 chars" |
109 |
| - |
110 | 86 | # Handle Definition File
|
111 | 87 | - name: Seek Definition files in Definition Path
|
112 | 88 | register: __def_file_stat
|
|
164 | 140 | fail_msg: "purge key is present in definition, but not a boolean as expected"
|
165 | 141 | quiet: yes
|
166 | 142 |
|
| 143 | +# Admin Password |
| 144 | +- name: Prompt User for a password if not provided in config or vault |
| 145 | + when: admin_password is undefined or admin_password | length < 2 |
| 146 | + block: |
| 147 | + - name: Prompt User for Password if not supplied |
| 148 | + no_log: true |
| 149 | + pause: |
| 150 | + prompt: "No admin password found in profile.yml or extra_vars, or provided password too short; please provide a Password" |
| 151 | + register: __user_input_password |
| 152 | + |
| 153 | + - name: Set Admin password |
| 154 | + no_log: true |
| 155 | + ansible.builtin.set_fact: |
| 156 | + admin_password: "{{ __user_input_password.user_input }}" |
| 157 | + |
| 158 | +- name: Assert user has supplied an Admin Password |
| 159 | + no_log: true |
| 160 | + ansible.builtin.assert: |
| 161 | + quiet: yes |
| 162 | + that: |
| 163 | + - admin_password is defined |
| 164 | + - admin_password | length > 2 |
| 165 | + fail_msg: "You must supply an Admin Password of at least 2 chars" |
| 166 | + |
167 | 167 | # Merge User Profile to Globals
|
168 | 168 | - name: Marshal User Config into Globals
|
169 | 169 | ansible.builtin.set_fact:
|
|
0 commit comments