Skip to content

Commit

Permalink
Merge pull request #81 from redhat-cop/ericzolf-add-setuplog-fix-aap-…
Browse files Browse the repository at this point in the history
…4555

Add AAP-4555 setup.log fix to aap_setup_install
  • Loading branch information
Tompage1994 authored Jul 5, 2022
2 parents 0819e19 + c83b5fe commit e4407ed
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/aap_setup_install/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,9 @@ aap_setup_inst_extra_vars: {}

# force the installation of AAP even if it's already running
aap_setup_inst_force: false

# list of fixes to apply before starting the actual installation,
# review before bumping up the default AAP version
aap_setup_inst_fixes:
- aap_4555 # setup.log is only saved on first call as non-root (2.2.0)
...
23 changes: 23 additions & 0 deletions roles/aap_setup_install/tasks/fixes/aap_4555.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# Fix for https://issues.redhat.com/browse/AAP-4555 - it'll move away the
# setup.log before starting the installation

- name: AAP_4555 | check if setup.log does exist
ansible.builtin.stat:
path: "{{ aap_setup_inst_setup_dir }}/setup.log"
register: __aap_setup_inst_log

- name: AAP_4555 | create a backup of setup.log if it exists
ansible.builtin.copy:
src: /dev/null
dest: "{{ aap_setup_inst_setup_dir }}/setup.log"
backup: true # we use the backup feature of copy to save setup.log
remote_src: true
mode: 0664
when: __aap_setup_inst_log.stat.exists

- name: AAP_4555 | make sure setup.log doesn't exist
ansible.builtin.file:
path: "{{ aap_setup_inst_setup_dir }}/setup.log"
state: absent
...
5 changes: 5 additions & 0 deletions roles/aap_setup_install/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
# tasks file for aap_setup_install

- name: apply relevant fixes / workarounds
include_tasks:
file: "fixes/{{ item }}.yml"
loop: "{{ aap_setup_inst_fixes }}"

- name: Check Ansible Tower Running
uri:
url: "https://{{ controller_hostname }}/"
Expand Down

0 comments on commit e4407ed

Please sign in to comment.