Commit 3d1c5f50 authored by Rafael Monnerat's avatar Rafael Monnerat

playbook: Use package state as parameter,

 In this way we can reuse the same roles for upgrade
parent efa71753
......@@ -22,7 +22,7 @@
default: "notoken"
roles:
- re6stnet
- slapos
- { role: re6stnet, package_state: present }
- { role: slapos, package_state: present }
- { role: package, package_name: ntp, package_state: present }
......@@ -13,11 +13,11 @@
when: ansible_distribution == "Debian"
- name: Install re6stnet package
apt: name=babeld=1.5.1-nxd2 state=present update_cache=yes
apt: name=babeld=1.5.1-nxd2 state={{ package_state }} update_cache=yes
when: ansible_distribution == "Debian"
- name: Install re6stnet package
apt: name=re6stnet state=present update_cache=yes
apt: name=re6stnet state={{ package_state }} update_cache=yes
when: ansible_distribution == "Debian"
- name: Check if configuration exists already
......
- name: Install packages using apt
apt: name=slapos-node state=present update_cache=yes cache_valid_time=3600
apt: name=slapos-node state={{ package_state }} update_cache=yes cache_valid_time=3600
when: ansible_os_family == "Debian"
- name: Install re6stnet on CentOS
yum: name=slapos.node state=present update_cache=yes
yum: name=slapos.node state={{ package_state }} update_cache=yes
when: ansible_os_family == "RedHat"
- name: Check if configuration exists already
......
......@@ -21,6 +21,6 @@
default: "notoken"
roles:
- slapos
- { role: slapos, package_state: present }
- { role: package, package_name: ntp, package_state: present }
- rafael_ssh_key
......@@ -17,7 +17,7 @@
default: "notoken"
roles:
- slapos
- { role: slapos, package_state: present }
- { role: package, package_name: ntp, package_state: present }
......@@ -17,8 +17,8 @@
default: "notoken"
roles:
- re6stnet-legacy
- slapos
- { role: re6stnet-legacy, package_state: present }
- { role: slapos, package_state: present }
- { role: package, package_name: ntp, package_state: present }
- vifib-server-shuttle
......@@ -17,8 +17,8 @@
default: "notoken"
roles:
- re6stnet-legacy
- slapos
- { role: re6stnet-legacy, package_state: present }
- { role: slapos, package_state: present }
- { role: package, package_name: ntp, package_state: present }
- vifib-server
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