Commit 0b77f029 authored by Alain Takoudjou's avatar Alain Takoudjou

playbook: add option to enable vifib-kernel role in upgrader

Use vifib-kernel to upgrade debian kernel and distro to a recent version
parent 7fd815e7
......@@ -58,7 +58,7 @@
current_upgrade_signature
- name: Do upgrade
shell: ansible-playbook {{ upgrader_playbook }} -i hosts 2>>/opt/upgrader/latest_upgrade.log >> /opt/upgrader/latest_upgrade.log
shell: ansible-playbook {{ upgrader_playbook }} --extra-vars "vars_file={{vars_file | default('')}}" -i hosts 2>>/opt/upgrader/latest_upgrade.log >> /opt/upgrader/latest_upgrade.log
when: (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
args:
chdir: /opt/upgrader/playbook-tmp/
......
......@@ -4,6 +4,10 @@
apt: name=linux-image-4.9.0-5-amd64 state=latest update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Install Debian jessie-backports repository
lineinfile: dest='/etc/apt/sources.list' line='deb http://ftp.debian.org/debian jessie-backports main' state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"
- name: Install kernel 4.9 on debian 8.0
apt: name=linux-image-4.9.0-0.bpo.5-amd64 state=latest default_release=jessie-backports update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"
......
......@@ -9,6 +9,11 @@
vars_files:
- settings/vifib.yml
pre_tasks:
- name: Load dynamic variables
include_vars: "{{vars_file}}"
when: vars_file is defined and vars_file != ''
roles:
- ntp
- { role: package, package_name: lm-sensors, package_state: latest }
......@@ -27,3 +32,5 @@
- vifib-server
- rsyslogd
- sysstat
- role: vifib-kernel
when: upgrade_kernel | default(False) == True
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment