diff --git a/roles/config_repos/files/monashhpc_base.repo b/roles/config_repos/files/monashhpc_base.repo new file mode 100644 index 0000000000000000000000000000000000000000..8f0d9aeee8c78a5a4d56b826e8ab100833d88bd0 --- /dev/null +++ b/roles/config_repos/files/monashhpc_base.repo @@ -0,0 +1,25 @@ +# Place this file in your /etc/yum.repos.d/ directory + +[monashhpc_base] +name=MonashHPC base repository mirrored to control the update process +baseurl=https://consistency0/centos/$releasever/os/$basearch/ +enabled=1 +sslverify=false + +[monashhpc_udpates] +name=MonashHPC base repository mirrored to control the update process +baseurl=https://consistency0/centos/$releasever/updates/$basearch/ +enabled=1 +sslverify=false + +[monashhpc_extras] +name=MonashHPC base repository mirrored to control the update process +baseurl=https://consistency0/centos/$releasever/extras/$basearch/ +enabled=1 +sslverify=false + +[monashhpc_centosplus] +name=MonashHPC base repository mirrored to control the update process +baseurl=https://consistency0/centos/$releasever/centosplus/$basearch/ +enabled=1 +sslverify=false diff --git a/roles/config_repos/files/monashhpc_others.repo b/roles/config_repos/files/monashhpc_others.repo new file mode 100644 index 0000000000000000000000000000000000000000..e78702bf53f5fe0a1284c0474aac75bba615aabd --- /dev/null +++ b/roles/config_repos/files/monashhpc_others.repo @@ -0,0 +1,8 @@ +# Place this file in your /etc/yum.repos.d/ directory + +[monashhpc_otherstuff] +name=MonashHPC base repository mirrored to control the update process +baseurl=https://consistency0/centos/hpcsystems/$releasever/$basearch/ +enabled=1 +sslverify=false +gpgcheck=0 diff --git a/roles/config_repos/tasks/main.yml b/roles/config_repos/tasks/main.yml index 6d2efb6b166f5be9d2e4d3efaeee94ecef7e3058..7feaa7de6355f7e648ed437cdf6b86b3b76a3431 100644 --- a/roles/config_repos/tasks/main.yml +++ b/roles/config_repos/tasks/main.yml @@ -1,18 +1,33 @@ --- -# this repository was broken on some CentOS images. Remove it. -- name: Removing the RDO repository - file: path=/etc/yum.repos.d/rdo-release.repo state=absent - sudo: true -- name: add gluster repo - copy: src=glusterfs-epel.repo dest=/etc/yum.repos.d/glusterfs-epel.repo +- name: make sure out repo server is resolvable + lineinfile: dest=/etc/hosts line="118.138.244.7 consistency0" sudo: true - when: ansible_os_family == 'RedHat' -- name: Install epel-release - yum: name=epel-release-7-5.noarch state=present +- name: remove default repos + file: + path: /usr/yum.repos.d/{{ item }} + state: absent + become: true + become_user: root + with_items: + - CentOS-Base.repo + - CentOS-Debuginfo.repo + - CentOS-fasttrack.repo + - CentOS-Sources.repo + - CentOS-Vault.repo + - foreman.repo + - puppetlabs.repo + - rdo-release.repo + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7" + +- name: add our repos + copy: src={{ item }} dest=/etc/yum.repos.d/{{ item }} sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7" + with_items: + - monashhpc_base.repo + - monashhpc_others.repo #- name: Enable epel