From bc7702cd6484ad01a67e0633403497f996df69bb Mon Sep 17 00:00:00 2001 From: senyoltw Date: Tue, 17 Nov 2020 16:45:27 +0900 Subject: [PATCH 1/3] set-env is disabled by github actions --- .github/workflows/agent.yml | 2 +- .github/workflows/javagateway.yml | 2 +- .github/workflows/proxy.yml | 2 +- .github/workflows/server.yml | 2 +- .github/workflows/web.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index 7213772bf..6246b6052 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -61,7 +61,7 @@ jobs: - name: Build the collection run: | collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) - echo "::set-env name=COLLECTION_FILE::$collection_file" + echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV - name: Install the collection run: ansible-galaxy collection install $COLLECTION_FILE diff --git a/.github/workflows/javagateway.yml b/.github/workflows/javagateway.yml index d25c536fc..ac3d52bd4 100644 --- a/.github/workflows/javagateway.yml +++ b/.github/workflows/javagateway.yml @@ -42,7 +42,7 @@ jobs: - name: Build the collection run: | collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) - echo "::set-env name=COLLECTION_FILE::$collection_file" + echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV - name: Install the collection run: ansible-galaxy collection install $COLLECTION_FILE diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index c1b7e709d..ee95c2ee7 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -55,7 +55,7 @@ jobs: - name: Build the collection run: | collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) - echo "::set-env name=COLLECTION_FILE::$collection_file" + echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV - name: Install the collection run: ansible-galaxy collection install $COLLECTION_FILE diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 10e99ec05..57a573c73 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -55,7 +55,7 @@ jobs: - name: Build the collection run: | collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) - echo "::set-env name=COLLECTION_FILE::$collection_file" + echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV - name: Install the collection run: ansible-galaxy collection install $COLLECTION_FILE diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 5b50cc0fd..66058188f 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -54,7 +54,7 @@ jobs: - name: Build the collection run: | collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) - echo "::set-env name=COLLECTION_FILE::$collection_file" + echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV - name: Install the collection run: ansible-galaxy collection install $COLLECTION_FILE From 06ab8178952ad5db7ed77cda17a2e32333ae0674 Mon Sep 17 00:00:00 2001 From: senyoltw Date: Fri, 20 Nov 2020 20:03:10 +0900 Subject: [PATCH 2/3] Split the way to enable support for software collection (CentOS and RedHat) --- docs/ZABBIX_WEB_ROLE.md | 3 ++- roles/zabbix_web/defaults/main.yml | 1 + roles/zabbix_web/tasks/RedHat.yml | 23 ++++++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/ZABBIX_WEB_ROLE.md b/docs/ZABBIX_WEB_ROLE.md index a2674fff7..b6c6bc99a 100644 --- a/docs/ZABBIX_WEB_ROLE.md +++ b/docs/ZABBIX_WEB_ROLE.md @@ -91,7 +91,8 @@ The following is an overview of all available configuration defaults for this ro * `zabbix_repo_yum_enabled`: A list with repository names that should be enabled when installing Zabbix component specific packages. * `zabbix_web_package_state`: Default: `present`. Can be overridden to `latest` to update packages when needed. -* `zabbix_web_centos_release`: Default: False. When the `centos-release-scl` repository needs to be enabled. This is required when using Zabbix 5.0 due to installation of a recent version of `PHP`. +* `zabbix_web_centos_release`: Default: True. When the `centos-release-scl` repository needs to be enabled. This is required when using Zabbix 5.0 due to installation of a recent version of `PHP`. +* `zabbix_web_rhel_release`: Default: True. When the `scl-utils` repository needs to be enabled. This is required when using Zabbix 5.0 due to installation of a recent version of `PHP`. * `zabbix_web_doubleprecision`: Default: `False`. For upgraded installations, please read database [upgrade notes](https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500) (Paragraph "Enabling extended range of numeric (float) values") before enabling this option. * `zabbix_web_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. diff --git a/roles/zabbix_web/defaults/main.yml b/roles/zabbix_web/defaults/main.yml index c9e67f29d..9c96ee889 100644 --- a/roles/zabbix_web/defaults/main.yml +++ b/roles/zabbix_web/defaults/main.yml @@ -6,6 +6,7 @@ zabbix_version: "{{ zabbix_web_version }}" zabbix_repo: zabbix zabbix_web_package_state: present zabbix_web_centos_release: true +zabbix_web_rhel_release: true zabbix_selinux: False zabbix_web_doubleprecision: False zabbix_web_conf_mode: "0640" diff --git a/roles/zabbix_web/tasks/RedHat.yml b/roles/zabbix_web/tasks/RedHat.yml index de4e8554c..0f95c530a 100644 --- a/roles/zabbix_web/tasks/RedHat.yml +++ b/roles/zabbix_web/tasks/RedHat.yml @@ -44,7 +44,7 @@ tags: - zabbix-web -- name: "RedHat | Install zabbix-web dependency (Zabbix 5.x)" +- name: "RedHat | Install zabbix-web dependency (Zabbix 5.x) (CentOS)" yum: pkg: - centos-release-scl @@ -59,6 +59,27 @@ - zabbix_version is version('5.0', '>=') - zabbix_web_centos_release - ansible_distribution_major_version != '8' + - ansible_distribution == "CentOS" + tags: + - zabbix-web + +- name: "RedHat | Install zabbix-web dependency (Zabbix 5.x) (RHEL)" + yum: + pkg: + - scl-utils + - scl-utils-build + state: "{{ zabbix_web_package_state }}" + update_cache: yes + disablerepo: "{{ '*' if (zabbix_repo_yum_enabled | length>0) else omit }}" + enablerepo: "{{ zabbix_repo_yum_enabled if zabbix_repo_yum_enabled is iterable and (zabbix_repo_yum_enabled | length>0) else omit }}" + register: zabbix_web_dependency_package_install + until: zabbix_web_dependency_package_install is succeeded + become: yes + when: + - zabbix_version is version('5.0', '>=') + - zabbix_web_centos_release + - ansible_distribution_major_version != '8' + - ansible_distribution == "RedHat" tags: - zabbix-web From 56dbe497e2b406433f3da8c5965fe4fa39a005ca Mon Sep 17 00:00:00 2001 From: senyoltw Date: Sat, 21 Nov 2020 16:57:03 +0900 Subject: [PATCH 3/3] add changelog --- changelogs/fragments/266-zabbix_web.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelogs/fragments/266-zabbix_web.yml diff --git a/changelogs/fragments/266-zabbix_web.yml b/changelogs/fragments/266-zabbix_web.yml new file mode 100644 index 000000000..d231a1afa --- /dev/null +++ b/changelogs/fragments/266-zabbix_web.yml @@ -0,0 +1,4 @@ +bugfixes: + - zabbix_web - fixed issue Role cannot install Zabbix web 5.0 on RHEL 7 (https://github.com/ansible-collections/community.zabbix/issues/202). +minor_changes: + - zabbix_web - added `zabbix_web_rhel_release` which enable scl on RHEL (https://github.com/ansible-collections/community.zabbix/pull/266).