From 0e66c9fbcbc2a8389e8f526278c48381702cb6e3 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Sat, 9 Sep 2023 17:59:41 -0400 Subject: [PATCH] Implement a tomcat upgrade workaround for upgrade pipelines --- pipelines/upgrade/05-server_to_intermediate.yml | 2 ++ roles/update_tomcat/tasks/main.yml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 roles/update_tomcat/tasks/main.yml diff --git a/pipelines/upgrade/05-server_to_intermediate.yml b/pipelines/upgrade/05-server_to_intermediate.yml index 4886d440c..4bd1e721d 100644 --- a/pipelines/upgrade/05-server_to_intermediate.yml +++ b/pipelines/upgrade/05-server_to_intermediate.yml @@ -19,6 +19,8 @@ scenario: "{{ pipeline_type }}" scenario_os: "{{ pipeline_os }}" scenario_version: "{{ forklift_upgrade_version_intermediate }}" + - role: update_tomcat + when: (pipeline_type == 'katello' || pipeline_type == 'luna') && pipeline_os == 'centos8-stream' - foreman_server_repositories - role: foreman_installer foreman_installer_skip_installer: "{{ true if forklift_upgrade_version_start == forklift_upgrade_version_intermediate else false }}" diff --git a/roles/update_tomcat/tasks/main.yml b/roles/update_tomcat/tasks/main.yml new file mode 100644 index 000000000..70a8be93b --- /dev/null +++ b/roles/update_tomcat/tasks/main.yml @@ -0,0 +1,17 @@ +--- +- name: Set module hotfixes on AppStream + ansible.builtin.lineinfile: + path: /etc/yum.repos.d/CentOS-Stream-AppStream.repo + line: module_hotfixes=1 + insertbefore: EOF + +- name: Update just tomcat + ansible.builtin.package: + name: tomcat + state: latest + +- name: Remove module hotfixes + ansible.builtin.lineinfile: + path: /etc/yum.repos.d/CentOS-Stream-AppStream.repo + line: module_hotfixes=1 + state: absent