Commit a47223e8 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

playbook: move vifib-upgrade into role and add new vifib-kernel-upgrade playbook

parent ece9e2e8
- copy: dest=/etc/apt/apt.conf.d/99slapos src=../files/99slapos
- copy: dest=/etc/apt/apt.conf.d/99slapos src=99slapos
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "9") or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "17")
- name: Update repos for debian 9
......
---
dependencies:
- { role: debian9-aptconf }
......@@ -121,5 +121,3 @@
when: ansible_distribution == "Fedora" and ansible_distribution_major_version == "26"
- include: roles/debian9-aptconf/tasks/main.yml
......@@ -58,7 +58,7 @@
current_upgrade_signature
- name: Do upgrade
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
shell: ansible-playbook {{ upgrader_playbook }} -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/
......
---
dependencies:
- { role: debian9-aptconf }
---
- include: roles/debian9-aptconf/tasks/main.yml
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Install kernel 4.9 on debian 9.0
apt: name=linux-image-4.9.0-5-amd64 state=latest update_cache=no
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
......
---
dependencies:
- { role: ntp }
- { role: package, package_name: lm-sensors, package_state: latest }
- { role: package, package_name: wget, package_state: latest }
- { role: package, package_name: openssl, package_state: latest }
- { role: package, package_name: ca-certificates, package_state: latest }
- { role: package, package_name: openssh-server, package_state: latest }
- { role: package, package_name: strace, package_state: latest }
- { role: package, package_name: htop, package_state: latest }
- { role: package, package_name: ioping, package_state: latest }
- { role: package, package_name: exim4-base, package_state: absent }
- { role: package, package_name: slapos-node, package_state: latest }
- { role: package, package_name: re6st-node, package_state: latest }
- { role: re6stnet }
- { role: vifib-team-ssh-key }
- { role: vifib-server }
- { role: rsyslogd }
- { role: sysstat }
- { role: vifib-kernel, when: upgrade_kernel | default(False) == True }
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
vars:
- computer_name: noname
- slapostoken: notoken
vars_files:
- settings/vifib.yml
roles:
- { role: vifib-upgrade, upgrade_kernel: True }
......@@ -9,28 +9,5 @@
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 }
- { role: package, package_name: wget, package_state: latest }
- { role: package, package_name: openssl, package_state: latest }
- { role: package, package_name: ca-certificates, package_state: latest }
- { role: package, package_name: openssh-server, package_state: latest }
- { role: package, package_name: strace, package_state: latest }
- { role: package, package_name: htop, package_state: latest }
- { role: package, package_name: ioping, package_state: latest }
- { role: package, package_name: exim4-base, package_state: absent }
- { role: package, package_name: slapos-node, package_state: latest }
- { role: package, package_name: re6st-node, package_state: latest }
- re6stnet
- vifib-team-ssh-key
- vifib-server
- rsyslogd
- sysstat
- role: vifib-kernel
when: upgrade_kernel | default(False) == True
- { role: vifib-upgrade }
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