Skip to content

Commit

Permalink
tests: fix using undefined ansible_distribution_major_version
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jul 3, 2024
1 parent e3ae312 commit ff0598c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/scenarios/_common/ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
sed -i -e 's%mirror.centos.org%vault.centos.org%g' /etc/yum.repos.d/CentOS-Base.repo
sed -i -e 's%^mirrorlist=%#mirrorlist=%g' /etc/yum.repos.d/CentOS-Base.repo
sed -i -e 's%^#baseurl=%baseurl=%g' /etc/yum.repos.d/CentOS-Base.repo
when: ansible_distribution_major_version|int == 7
when: ansible_distribution_major_version is defined and ansible_distribution_major_version|int == 7

- name: "run set_admin_password"
shell: "! test -x /omd/sites/{{site}}/bin/set_admin_password || sudo su - {{ site }} -c 'set_admin_password omd'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
vars:
package:
- glibc-langpack-en
when: not locale_path.stat.exists and ansible_distribution_major_version|int >= 8
when: not locale_path.stat.exists and ansible_distribution_version|int >= 8

- name: "install File::ChangeNotify"
shell: "sudo su - {{ site }} -c 'cpanm -n File::ChangeNotify'"
Expand Down

0 comments on commit ff0598c

Please sign in to comment.