-
Chris Hines authored
Former-commit-id: 04ba192e
Chris Hines authoredFormer-commit-id: 04ba192e
main.yml 2.26 KiB
---
- name: install aptitude
apt: name=aptitude state=installed
become: true
become_user: root
when: ansible_os_family=="Debian"
- name: apt-get upgrade
apt: upgrade=safe
become: true
when: ansible_os_family=="Debian"
- name: yum remove
yum: name=ipa-client-common state=absent
become: true
become_user: root
when: ansible_os_family=="RedHat"
- name: yum upgrade
yum: name=* state=latest disablerepo={{ yumdisablerepo|join(',') }} enablerepo={{ yumenablerepo|join(',') }}
become: true
become_user: root
when: ansible_os_family=="RedHat" and yumdisablerepo is defined
- name: Clear yum pending transaction
command: yum-complete-transaction --cleanup-only
become: true
become_user: root
when: ansible_os_family == 'RedHat'
- name: yum upgrade
yum: name=* state=latest
become: true
become_user: root
when: ansible_os_family=="RedHat" and yumdisablerepo is undefined
- name: install kernel-devel
yum: name=kernel-devel state=latest disablerepo={{ yumdisablerepo|join(',') }} enablerepo={{ yumenablerepo|join(',') }}
become: true
become_user: root
when: ansible_os_family=="RedHat" and yumdisablerepo is defined
- name: install kernel-devel
yum: name=kernel-devel state=latest
become: true
become_user: root
when: ansible_os_family=="RedHat" and yumdisablerepo is undefined
- name: get kernel-devel version
shell: rpm -q kernel-devel | cut -f 3,4 -d "-" | sort | tail -n 1
register: rpm_q_output
when: ansible_os_family=="RedHat"
check_mode: no
changed_when: False
args:
warn: False
- name: get kernel version
shell: uname -r
register: uname_r_output
check_mode: no
changed_when: False
- name: default dont reboot
set_fact:
reboot_now: false
- name: debug1
debug: var=rpm_q_output