|
101 | 101 | ansible.builtin.set_fact: |
102 | 102 | _current_ca_server: "{{ _framework_config_live['IfW-CAServer']['Values'][0] | default(none) }}" |
103 | 103 | _current_global_zones: "{{ _framework_config_live['IfW-CustomZones']['Values'] }}" |
| 104 | + _current_cn: "{{ _framework_config_live['IfW-CustomHostname']['Values'][0] }}" |
104 | 105 | _current_port: "{{ _framework_config_live['IfW-Port']['Values'][0] | default(none) }}" |
105 | 106 | _current_parent_zone: "{{ _framework_config_live['IfW-ParentZone']['Values'][0] | default(none) }}" |
106 | 107 | _current_parents: "{{ _framework_config_live['IfW-ParentNodes']['Values'] }}" |
107 | 108 | _current_parents0: "{{ _framework_config_live['IfW-ParentAddress:' + ifw_icinga2_parents[0].cn]['Values'][0] | default(none) }}" |
108 | 109 | _current_parents1: "{{ (_framework_config_live['IfW-ParentAddress:' + ifw_icinga2_parents[1].cn]['Values'][0] if ifw_icinga2_parents | length > 1 else none) | default(none) }}" # noqa: yaml[line-length] |
| 110 | + _current_jea: "{{ _framework_config_live['IfW-InstallJEAProfile']['Selection'] }}" |
109 | 111 |
|
110 | 112 | - name: Check whether requested and existing configuration is identical |
111 | 113 | failed_when: false |
|
118 | 120 | - (_current_icinga_configuration.content | b64decode | from_json).Framework.Config.Live is defined |
119 | 121 | - (_current_ca_server | default(true, true)) == (_ifw_ca_server) |
120 | 122 | - _current_global_zones == ifw_icinga2_global_zones |
| 123 | + - _current_cn == ifw_icinga2_cn |
121 | 124 | - (_current_port | int) == (ifw_icinga2_port | int) |
122 | 125 | - _current_parent_zone == ifw_icinga2_parent_zone |
123 | 126 | - _current_parents == (ifw_icinga2_parents | map(attribute='cn')) |
124 | 127 | - _current_parents0 == _parent0 |
125 | 128 | - (_current_parents1 == _parent1 if ifw_icinga2_parents | length > 1 else true) |
| 129 | + - (_current_jea == "0" if (ifw_jea_install and not ifw_jea_managed_user) else true) |
| 130 | + - (_current_jea == "1" if (ifw_jea_install and ifw_jea_managed_user) else true) |
| 131 | + - (_current_jea == "2" if not ifw_jea_install else true) |
126 | 132 | fail_msg: "Configuration needs an update" |
127 | 133 | success_msg: "Configuration needs no update" |
128 | 134 | register: _assertion_result |
|
0 commit comments