|
66 | 66 | value: 1 |
67 | 67 | - name: no_timer_check |
68 | 68 | state: present |
69 | | - - name: quiet |
| 69 | + - name: option_without_value |
| 70 | + - name: option_with_value |
| 71 | + value: option_value |
70 | 72 | - previous: replaced |
71 | 73 | - kernel: ALL |
72 | 74 | options: |
73 | | - - name: debug |
| 75 | + - name: option_set_from_ALL |
74 | 76 | state: present |
75 | 77 | bootloader_timeout: 6 |
76 | 78 | include_role: |
|
89 | 91 | (bootloader_facts | |
90 | 92 | selectattr('index', 'search', cloned_kernel.index) | first).args | |
91 | 93 | regex_search('^.*console=tty0 print-fatal-signals=1 no_timer_check |
92 | | - quiet debug( |)$') |
| 94 | + option_without_value option_with_value=option_value option_set_from_ALL( |)$') | length > 0 |
93 | 95 |
|
94 | 96 | - name: Verify boot loader timeout configuration |
95 | 97 | command: cat {{ __bootloader_grub_conf }} |
|
106 | 108 | - kernel: |
107 | 109 | title: "{{ cloned_kernel.title }}" |
108 | 110 | options: |
109 | | - - name: quiet |
| 111 | + - name: option_without_value |
110 | 112 | state: absent |
111 | | - - name: debug |
| 113 | + - name: option_set_from_ALL |
| 114 | + state: absent |
| 115 | + - name: option_with_value |
112 | 116 | state: absent |
113 | 117 | bootloader_timeout: 4 |
114 | 118 | include_role: |
|
121 | 125 | assert: |
122 | 126 | that: not (bootloader_reboot_required | d(false)) |
123 | 127 |
|
124 | | - - name: Verify settings |
| 128 | + - name: Verify that existing settings remained and removed settings are not present |
| 129 | + vars: |
| 130 | + __settings: "{{ (bootloader_facts | selectattr('index', 'search', cloned_kernel.index) | first).args }}" |
125 | 131 | assert: |
126 | | - that: >- |
127 | | - (bootloader_facts | |
128 | | - selectattr('index', 'search', cloned_kernel.index) | first).args | |
129 | | - regex_search('^.*console=tty0 print-fatal-signals=1 |
130 | | - no_timer_check( |)$') |
| 132 | + that: |
| 133 | + - __settings | regex_search('^.*console=tty0 print-fatal-signals=1 no_timer_check( |)$') | length > 0 |
| 134 | + - __settings | regex_search('option_without_value') == none |
| 135 | + - __settings | regex_search('option_set_from_ALL') == none |
| 136 | + - __settings | regex_search('option_with_value') == none |
131 | 137 |
|
132 | 138 | - name: Verify boot loader timeout configuration |
133 | 139 | command: cat {{ __bootloader_grub_conf }} |
|
164 | 170 | (bootloader_facts | |
165 | 171 | selectattr('index', 'search', cloned_kernel.index) | first).args | |
166 | 172 | regex_search('^.*console=tty0 print-fatal-signals=1 |
167 | | - no_timer_check( |)$') |
| 173 | + no_timer_check( |)$') | length > 0 |
168 | 174 |
|
169 | 175 | - name: Verify boot loader timeout configuration |
170 | 176 | command: cat {{ __bootloader_grub_conf }} |
|
0 commit comments