Skip to content

Commit

Permalink
tests: switch centos7 machines to vault.centos.org
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jul 3, 2024
1 parent de4ce72 commit e3ae312
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions t/scenarios/_common/ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
shell: "yum clean all || :"
- name: "apt update"
shell: "apt update || :"
- name: "switch centos 7 to vault.centos.org"
shell: |
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

- name: "run set_admin_password"
shell: "! test -x /omd/sites/{{site}}/bin/set_admin_password || sudo su - {{ site }} -c 'set_admin_password omd'"
- name: "stop site"
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_version|int >= 8
when: not locale_path.stat.exists and ansible_distribution_major_version|int >= 8

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

0 comments on commit e3ae312

Please sign in to comment.