diff --git a/molecule/custom_config_file/converge.yml b/molecule/custom_config_file/converge.yml index 10d92f1..d41a968 100644 --- a/molecule/custom_config_file/converge.yml +++ b/molecule/custom_config_file/converge.yml @@ -1,11 +1,4 @@ --- -- name: Converge - hosts: all - vars_files: - - vars.yml - - ../apps.yml - collections: - - middleware_automation.wildfly - roles: - - role: wildfly_install - - role: wildfly_systemd +- ansible.builtin.import_playbook: playbook.yml + when: + - not eap_enable is defined diff --git a/molecule/custom_config_file/playbook.yml b/molecule/custom_config_file/playbook.yml new file mode 100644 index 0000000..10d92f1 --- /dev/null +++ b/molecule/custom_config_file/playbook.yml @@ -0,0 +1,11 @@ +--- +- name: Converge + hosts: all + vars_files: + - vars.yml + - ../apps.yml + collections: + - middleware_automation.wildfly + roles: + - role: wildfly_install + - role: wildfly_systemd diff --git a/molecule/custom_config_file/prepare.yml b/molecule/custom_config_file/prepare.yml index fc97268..7df93e5 100644 --- a/molecule/custom_config_file/prepare.yml +++ b/molecule/custom_config_file/prepare.yml @@ -16,5 +16,7 @@ serole: object_r setype: usr_t seuser: system_u + when: + - not eap_version is defined - import_playbook: ../prepare.yml diff --git a/molecule/custom_config_file/verify.yml b/molecule/custom_config_file/verify.yml index 09fed42..1cd3c50 100644 --- a/molecule/custom_config_file/verify.yml +++ b/molecule/custom_config_file/verify.yml @@ -6,14 +6,18 @@ collections: - middleware_automation.wildfly tasks: - - name: "Include apps verification" - ansible.builtin.include_tasks: ../verify_apps.yml - when: - - wildfly_apps is defined and wildfly_apps | length > 0 + - name: "Verify only if scenario is running upstream" + block: + - name: "Include apps verification" + ansible.builtin.include_tasks: ../verify_apps.yml + when: + - wildfly_apps is defined and wildfly_apps | length > 0 - - name: "Verify that state is consistent" - ansible.builtin.include_role: - name: wildfly_validation - vars: - - eap_validation_queries: - - { query: '/system-property=test:read-attribute(name=value)', expected_result: 'testvalue', expected_result_undefined: False} + - name: "Verify that state is consistent" + ansible.builtin.include_role: + name: wildfly_validation + vars: + - eap_validation_queries: + - { query: '/system-property=test:read-attribute(name=value)', expected_result: 'testvalue', expected_result_undefined: False} + when: + - not eap_enable is defined