diff --git a/src/roles/post_install/tasks/foreman-proxy-content.yaml b/src/roles/post_install/tasks/foreman-proxy-content.yaml deleted file mode 100644 index 45685822f..000000000 --- a/src/roles/post_install/tasks/foreman-proxy-content.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Mark installation as complete - ansible.builtin.copy: - dest: "{{ post_install_done_flag }}" - content: '' - mode: '0640' - delegate_to: localhost - become: false diff --git a/src/roles/post_install/tasks/main.yaml b/src/roles/post_install/tasks/main.yaml index e285b7504..77d33274e 100644 --- a/src/roles/post_install/tasks/main.yaml +++ b/src/roles/post_install/tasks/main.yaml @@ -1,6 +1,14 @@ --- -- name: Run post install tasks - ansible.builtin.include_tasks: "{{ flavor }}.yaml" - - name: Check for unrecognized Smart Proxy features ansible.builtin.include_tasks: smart_proxy_features_check.yaml + +- name: Post install message + ansible.builtin.include_tasks: message.yaml + +- name: Mark installation as complete + ansible.builtin.copy: + dest: "{{ post_install_done_flag }}" + content: '' + mode: '0640' + delegate_to: localhost + become: false diff --git a/src/roles/post_install/tasks/katello.yaml b/src/roles/post_install/tasks/message.yaml similarity index 66% rename from src/roles/post_install/tasks/katello.yaml rename to src/roles/post_install/tasks/message.yaml index 5db3275e7..581f4fba0 100644 --- a/src/roles/post_install/tasks/katello.yaml +++ b/src/roles/post_install/tasks/message.yaml @@ -1,5 +1,6 @@ --- -- name: Admin credentials +- name: Post install message + when: flavor in ['katello'] ansible.builtin.debug: msg: - "{{ _post_install_url_msg }}" @@ -7,10 +8,3 @@ vars: _post_install_url_msg: "Foreman is running at {{ post_install_foreman_server_url }}" _post_install_cred_msg: "Admin credentials: {{ post_install_foreman_initial_admin_username }}:{{ post_install_foreman_initial_admin_password }}" -- name: Mark installation as complete - ansible.builtin.copy: - dest: "{{ post_install_done_flag }}" - content: '' - mode: '0640' - delegate_to: localhost - become: false diff --git a/src/roles/post_install/tasks/smart_proxy_features_check.yaml b/src/roles/post_install/tasks/smart_proxy_features_check.yaml index 0d99854cc..236559f30 100644 --- a/src/roles/post_install/tasks/smart_proxy_features_check.yaml +++ b/src/roles/post_install/tasks/smart_proxy_features_check.yaml @@ -14,6 +14,11 @@ msg: >- Proxy {{ item.name }} reports unrecognized features: {{ item.unrecognized_features | join(', ') }}. Enable matching features in foremanctl or disable them on the proxy. - loop: "{{ _post_install_smart_proxies.resources }}" - when: - - item.unrecognized_features | default([]) | length > 0 + loop: "{{ _post_install_proxies_with_unrecognized_features }}" + loop_control: + label: "{{ item.name }}" + vars: + _post_install_proxies_with_unrecognized_features: >- + {{ _post_install_smart_proxies.resources | + selectattr('unrecognized_features', 'defined') | + selectattr('unrecognized_features', '!=', []) | list }}