Newer
Older
- name: make sure out repo server is resolvable
lineinfile:
dest: /etc/hosts
line: "{{ reposerverip }} {{ reposervername }}" #this is duplicated in the role calculateEtcHosts

Andreas Hamacher
committed
owner: root
group: root

Jafar Lie
committed
become: True
Chris Hines
committed
#- name: remove default repos
# file:
# path: /etc/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
# - CentOS-CR.repo
# - CentOS-Media.repo
# - CentOS-OpenStack-kilo.repo
# - epel.repo
# - monashhpc_mellanox.repo
# - epel-testing.repo
# when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
template: src={{ item }}.j2 dest=/etc/yum.repos.d/{{ item }}
Chris Hines
committed
become: true
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
with_items:
- monashhpc_base.repo
- monashhpc_others.repo
Chris Hines
committed
- name: get enabled repos
#shell: yum repolist | grep -v "repo id" | grep -v "Loaded plugins" | head -n -1 | cut -f 1 -d '/' | sed -s 's/\!//'
shell: yum repolist all | grep enabled | cut -f 1 -d '/' | sed -s 's/\!//'
when: ansible_os_family == 'RedHat'
Chris Hines
committed
register: repolist
check_mode: no
Chris Hines
committed
changed_when: False
Chris Hines
committed
- name: disable unwanted repos
with_items: "{{ repolist.stdout_lines|difference(yumenablerepo) }}"
Chris Hines
committed
become: true
become_user: root
ignore_errors: true
when: ansible_os_family == 'RedHat'
Chris Hines
committed
#- name: Enable epel
# command: yum-config-manager --enable epel
Chris Hines
committed
# become: true
# when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
# Use mate DE on systems that have moved to gnome3, since there is no gpu acceleration by default on NeCTAR openstack
# Trusty (Ubuntu 14.04 LTS) needs repos added. Wheezy (Debian Stable) gets mate from backports, Utopic (Ubuntu 14.10) Jessie (Debian testing) and Sid (Debian unstable) get it by default
- name: add repos apt
shell: "add-apt-repository -y ppa:ubuntu-mate-dev/ppa"
Chris Hines
committed
become: true
when: ansible_distribution_release == 'trusty'
- name: add repos apt
shell: "add-apt-repository -y ppa:ubuntu-mate-dev/trusty-mate"
Chris Hines
committed
become: true
when: ansible_distribution_release == 'trusty'
- name: apt-get update
apt: update_cache=True
Chris Hines
committed
become: true
when: ansible_os_family=="Debian"