install epel-release on RHEL7

This commit is contained in:
Smana 2016-02-13 11:59:46 +01:00
parent a649aa8b7e
commit c0cf506fb4
3 changed files with 11 additions and 13 deletions

View file

@ -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)

View file

@ -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

View file

@ -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 when: ansible_distribution == "CentOS"
ansible_distribution == "CentOS"
- name: Install packages requirements - name: Install packages requirements
action: action: