Browse Source

install epel-release on RHEL7

pull/142/head
Smana 8 years ago
parent
commit
c0cf506fb4
3 changed files with 11 additions and 13 deletions
  1. 6
      roles/kubernetes/master/tasks/main.yml
  2. 5
      roles/kubernetes/master/tasks/start.yml
  3. 13
      roles/kubernetes/preinstall/tasks/main.yml

6
roles/kubernetes/master/tasks/main.yml

@ -91,9 +91,3 @@
name: kubelet name: kubelet
state: restarted state: restarted
changed_when: false changed_when: false
- name: restart kube-apiserver
service:
name: kube-apiserver
state: restarted
when: secret_changed | default(false)

5
roles/kubernetes/master/tasks/start.yml

@ -11,11 +11,12 @@
name: kube-apiserver name: kube-apiserver
state: restarted state: restarted
enabled: yes enabled: yes
when: restart_apimaster is defined and restart_apimaster == True
when: ( restart_apimaster is defined and restart_apimaster == True) or
secret_changed | default(false)
- name: Enable apiserver - name: Enable apiserver
service: service:
name: kube-apiserver name: kube-apiserver
enabled: yes enabled: yes
state: started state: started
when: restart_apimaster is not defined or restart_apimaster == False
when: restart_apimaster is not defined or restart_apimaster == False

13
roles/kubernetes/preinstall/tasks/main.yml

@ -59,23 +59,26 @@
when: ansible_pkg_mgr == 'yum' when: ansible_pkg_mgr == 'yum'
- name: Install python-apt for Debian distribs - name: Install python-apt for Debian distribs
shell: apt-get install -y python-apt
command: apt-get install -y python-apt
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"
changed_when: False changed_when: False
- name: Install python-dnf for latest RedHat versions - name: Install python-dnf for latest RedHat versions
shell: dnf install -y python-dnf yum
command: dnf install -y python-dnf yum
when: ansible_distribution == "Fedora" and when: ansible_distribution == "Fedora" and
ansible_distribution_major_version > 21 ansible_distribution_major_version > 21
changed_when: False changed_when: False
- name: Install epel-release for RedHat and CentOS distribs
- name: Install epel-release on RHEL
command: rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
when: ansible_distribution == "RedHat"
- name: Install epel-release on CentOS
action: action:
module: "{{ ansible_pkg_mgr }}" module: "{{ ansible_pkg_mgr }}"
name: "epel-release" name: "epel-release"
state: latest state: latest
when: ansible_distribution == "RedHat" or
ansible_distribution == "CentOS"
when: ansible_distribution == "CentOS"
- name: Install packages requirements - name: Install packages requirements
action: action:

Loading…
Cancel
Save