summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/common/tasks/redhat/packages.yml
blob: 888ccaeabaa8fbb8ad83a8f29a58742aa7a73c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- name: disable Network Manager on next boot
  service:
    name: NetworkManager
    enabled: no
    # Note that this only works because the interfaces of interest
    # have been marked in Vagrant as: nm_controlled: "no" - otherwise
    # NetworkManager would stop and take the interfaces down with it!
    state: stopped

- name: find non-autocluster YUM repo files
  find:
    paths: /etc/yum.repos.d/
    patterns: '(?!autocluster-)^.*\.repo$'
    use_regex: yes
  register: find_results
  when: repositories_delete_existing

- name: Remove non-autocluster repo files
  file:
    path: "{{ f['path'] }}"
    state: absent
  with_list: "{{ find_results['files'] }}"
  loop_control:
    loop_var: f
  when: repositories_delete_existing

- name: Add local distro repos
  yum_repository:
    name: "autocluster-{{ repo.name }}"
    description: "{{ repo.name }}"
    baseurl: "{{ repo.baseurl | default(repository_baseurl) }}/{{ repo.path }}"
    gpgcheck: "{{ repo.gpgcheck | default('yes') }}"
    proxy: _none_
  when: repo.type == "distro"
  with_list: "{{ repositories }}"
  loop_control:
    loop_var: repo

- name: ensure optional dependencies for Ansible template handling
  package:
    name: libselinux-python
    state: present

- name: ensure NFS client tools are installed
  package:
    name: nfs-utils
    state: present