File tree Expand file tree Collapse file tree 2 files changed +18
-26
lines changed
Expand file tree Collapse file tree 2 files changed +18
-26
lines changed Original file line number Diff line number Diff line change 66 hosts : " {{ cifmw_target_host | default('localhost') }}"
77 gather_facts : true
88 pre_tasks :
9+ - name : Daniel - print cifmw_devscripts_zironic_deployment
10+ ansible.builtin.debug :
11+ msg : |
12+ the cifmw_devscripts_zironic_deployment is {{ cifmw_devscripts_zironic_deployment | default('') }}
13+
914 - name : Inherit from parent scenarios if needed
1015 ansible.builtin.include_tasks :
1116 file : " ci/playbooks/tasks/inherit_parent_scenario.yml"
Original file line number Diff line number Diff line change 1414# License for the specific language governing permissions and limitations
1515# under the License.
1616
17-
1817- name : Collect lvm information
1918 become : true
2019 ansible.builtin.setup :
2120 gather_subset :
22- - ' !all'
23- - ' !min'
2421 - hardware
25- filter :
26- - ansible_lvm
27-
28- # ToDo: Identify why ansible-lint rule is violated.
29- - name : Gathering root mount details # noqa: jinja[invalid]
30- vars :
31- query_str : " [?mount=='/']"
32- ansible.builtin.set_fact :
33- root_mount_data : >-
34- {{
35- ansible_mounts |
36- community.general.json_query(query_str) |
37- first
38- }}
22+ - mounts
3923
4024- name : Extending root logical volume
4125 become : true
4226 vars :
43- device_name : " {{ root_mount_data['device'] | split('/') | last }}"
44- lv_name : " {{ device_name | split('-') | last }}"
45- when :
46- - ansible_lvm
47- - root_mount_data
48- - ansible_lvm != 'N/A'
49- - " lv_name in ansible_lvm.lvs"
27+ root_dev : " {{ (ansible_mounts | selectattr('mount', '==', '/') | first).device | default('') }}"
28+ root_lv : " {{ root_dev | split('/') | last | split('-') | last | default('') }}"
5029 community.general.lvol :
51- lv : " {{ lv_name }}"
52- vg : " {{ ansible_lvm[' lvs'][lv_name]['vg'] }}"
30+ lv : " {{ root_lv }}"
31+ vg : " {{ ansible_lvm. lvs[root_lv].vg }}"
5332 size : +100%FREE
5433 resizefs : true
34+ when :
35+ - ansible_lvm | default({}) != {}
36+ - root_lv in ansible_lvm.lvs
37+ - ansible_lvm.lvs[root_lv].vg is defined
38+ register : _extend
39+ until : _extend is succeeded
40+ retries : 5
41+ delay : 5
You can’t perform that action at this time.
0 commit comments