pre-flight.yml 965 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. - name: Pre-flight checks only.
  3. hosts: workstation.lab.example.com
  4. gather_subset: min
  5. become: no
  6. roles:
  7. - role: pull-tools
  8. tags: prep
  9. - role: pull-images
  10. tags: prep
  11. - role: pull-files
  12. tags: prep
  13. - role: check-env
  14. tags: check
  15. - role: fix-operators
  16. tags: fix
  17. # TODO: convert to role?
  18. tasks:
  19. - name: get current eap version
  20. set_fact:
  21. eap_version: "{{ lookup('file', '/opt/eap/version.txt') }}"
  22. - name: patch eap server
  23. become: yes
  24. command: /opt/eap/bin/jboss-cli.sh --command="patch apply {{ ansible_facts['user_dir'] }}/Downloads/jboss-eap-{{ eap_z }}-patch.zip"
  25. when:
  26. - eap_z not in eap_version
  27. register: patched
  28. - name: remove patch when done
  29. file:
  30. path: "{{ ansible_facts['user_dir'] }}/Downloads/jboss-eap-{{ eap_z }}-patch.zip"
  31. state: absent
  32. when:
  33. - patched is defined
  34. - patched.changed
  35. ...