summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml41
1 files changed, 26 insertions, 15 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
index 99008446d..68df2153d 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
@@ -12,6 +12,8 @@
- name: Evaluate additional groups for upgrade
hosts: localhost
+ connection: local
+ become: no
tasks:
- name: Evaluate etcd_hosts_to_backup
add_host:
@@ -37,9 +39,9 @@
- fail:
msg: >
- This upgrade is only supported for origin and openshift-enterprise
+ This upgrade is only supported for origin, openshift-enterprise, and online
deployment types
- when: deployment_type not in ['origin','openshift-enterprise']
+ when: deployment_type not in ['origin','openshift-enterprise', 'online']
- fail:
msg: >
@@ -57,8 +59,8 @@
vars:
target_version: "{{ '1.1' if deployment_type == 'origin' else '3.1' }}"
tasks:
- - name: Clean yum cache
- command: yum clean all
+ - name: Clean package cache
+ command: "{{ ansible_pkg_mgr }} clean all"
- set_fact:
g_new_service_name: "{{ 'origin' if deployment_type =='origin' else 'atomic-openshift' }}"
@@ -90,6 +92,8 @@
##############################################################################
- name: Gate on pre-upgrade checks
hosts: localhost
+ connection: local
+ become: no
vars:
pre_upgrade_hosts: "{{ groups.oo_masters_to_config | union(groups.oo_nodes_to_config) }}"
tasks:
@@ -152,9 +156,7 @@
when: (embedded_etcd | bool) and (etcd_disk_usage.stdout|int > avail_disk.stdout|int)
- name: Install etcd (for etcdctl)
- yum:
- pkg: etcd
- state: latest
+ action: "{{ ansible_pkg_mgr }} name=etcd state=latest"
- name: Generate etcd backup
command: >
@@ -174,6 +176,8 @@
##############################################################################
- name: Gate on etcd backup
hosts: localhost
+ connection: local
+ become: no
tasks:
- set_fact:
etcd_backup_completed: "{{ hostvars
@@ -192,6 +196,8 @@
###############################################################################
- name: Create temp directory for syncing certs
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
tasks:
- name: Create local temp directory for syncing certs
@@ -225,17 +231,14 @@
openshift_version: "{{ openshift_pkg_version | default('') }}"
tasks:
- name: Upgrade to latest available kernel
- yum:
- pkg: kernel
- state: latest
+ action: "{{ ansible_pkg_mgr}} name=kernel state=latest"
- name: Upgrade master packages
- command: yum update -y {{ openshift.common.service_type }}-master{{ openshift_version }}
+ command: "{{ ansible_pkg_mgr}} update -y {{ openshift.common.service_type }}-master{{ openshift_version }}"
- name: Ensure python-yaml present for config upgrade
- yum:
- pkg: PyYAML
- state: installed
+ action: "{{ ansible_pkg_mgr }} name=PyYAML state=present"
+ when: not openshift.common.is_atomic | bool
- name: Upgrade master configuration
openshift_upgrade_config:
@@ -342,6 +345,8 @@
- name: Delete temporary directory on localhost
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
tasks:
- file: name={{ g_master_mktemp.stdout }} state=absent
@@ -360,6 +365,8 @@
##############################################################################
- name: Gate on master update
hosts: localhost
+ connection: local
+ become: no
tasks:
- set_fact:
master_update_completed: "{{ hostvars
@@ -383,7 +390,7 @@
- openshift_facts
tasks:
- name: Upgrade node packages
- command: yum update -y {{ openshift.common.service_type }}-node{{ openshift_version }}
+ command: "{{ ansible_pkg_mgr }} update -y {{ openshift.common.service_type }}-node{{ openshift_version }}"
- name: Restart node service
service: name="{{ openshift.common.service_type }}-node" state=restarted
@@ -400,6 +407,8 @@
##############################################################################
- name: Gate on nodes update
hosts: localhost
+ connection: local
+ become: no
tasks:
- set_fact:
node_update_completed: "{{ hostvars
@@ -467,6 +476,8 @@
##############################################################################
- name: Gate on reconcile
hosts: localhost
+ connection: local
+ become: no
tasks:
- set_fact:
reconcile_completed: "{{ hostvars