Skip to content

Commit

Permalink
Changes for Ansible 2.8 compatibility (#10)
Browse files Browse the repository at this point in the history
* Ensure that required variables are defined

* Always wait for AEM startup to avoid issues with a already starting instance

* Remove inventory hostname from task name.

* Readd logging of inventory_hostname to name. Always wait for AEM to stop.

* Add fail message
  • Loading branch information
Tobias Richter authored Dec 11, 2020
1 parent 6c4aca3 commit f30ad11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
- name: Ensure that required variables are defined.
assert:
that:
- aem_service_name is defined
- aem_service_port is defined
fail_msg: "'aem_service_name' and 'aem_service_port' must be defined"

- name: Include service manager specific variables.
include_vars: "{{ item }}"
with_first_found:
Expand Down
1 change: 0 additions & 1 deletion tasks/start_aem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
until: result.content.find("QUICKSTART_HOMEPAGE") != -1
retries: "{{ aem_service_timeout // 10 }}"
delay: 10
when: aem_service_start_result_escalated.changed or aem_service_start_result_restricted.changed
tags:
- skip_ansible_lint
3 changes: 1 addition & 2 deletions tasks/stop_aem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@

when: aem_service_restricted_mode

- name: Wait for AEM shutdown.
- name: "Wait for AEM shutdown. [{{ inventory_hostname }}]"
wait_for:
port: "{{ aem_service_port }}"
state: stopped
delay: 0
sleep: 10
timeout: "{{ aem_service_timeout }}"
when: aem_service_stop_result_escalated.changed or aem_service_stop_result_restricted.changed
tags:
- skip_ansible_lint

0 comments on commit f30ad11

Please sign in to comment.