summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-11-21 16:26:21 -0500
committerGitHub <noreply@github.com>2016-11-21 16:26:21 -0500
commit4954982b72451f82bd40802b0bdf39379ad4bdf1 (patch)
treeb890599b1719b630e3fae8197f9d8417e9a29c20 /playbooks
parente34870e2b1b452f9719d14911d7a2a557ca701bd (diff)
parent7e0c346c8406eb6142e8d38fdec4e13236f3cdc6 (diff)
downloadopenshift-4954982b72451f82bd40802b0bdf39379ad4bdf1.tar.gz
openshift-4954982b72451f82bd40802b0bdf39379ad4bdf1.tar.bz2
openshift-4954982b72451f82bd40802b0bdf39379ad4bdf1.tar.xz
openshift-4954982b72451f82bd40802b0bdf39379ad4bdf1.zip
Merge pull request #2818 from mtnbikenc/package-refactor
Refactor to use Ansible package module
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/adhoc/uninstall.yml10
-rw-r--r--playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/backup.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml5
5 files changed, 11 insertions, 10 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index 4ea639cbe..be1070f73 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -84,7 +84,7 @@
- firewalld
- name: Remove packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+ package: name={{ item }} state=absent
when: not is_atomic | bool
with_items:
- atomic-enterprise
@@ -114,7 +114,7 @@
- tuned-profiles-origin-node
- name: Remove flannel package
- action: "{{ ansible_pkg_mgr }} name=flannel state=absent"
+ package: name=flannel state=absent
when: openshift_use_flannel | default(false) | bool and not is_atomic | bool
- shell: systemctl reset-failed
@@ -247,7 +247,7 @@
- atomic-openshift-master
- name: Remove packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+ package: name={{ item }} state=absent
when: not is_atomic | bool
with_items:
- atomic-enterprise
@@ -349,7 +349,7 @@
failed_when: false
- name: Remove packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+ package: name={{ item }} state=absent
when: not is_atomic | bool
with_items:
- etcd
@@ -388,7 +388,7 @@
- firewalld
- name: Remove packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+ package: name={{ item }} state=absent
when: not is_atomic | bool
with_items:
- haproxy
diff --git a/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
index 417096dd0..5d753447c 100644
--- a/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
@@ -35,7 +35,7 @@
- service: name=docker state=stopped
- name: Upgrade Docker
- action: "{{ ansible_pkg_mgr }} name=docker{{ '-' + docker_version }} state=present"
+ package: name=docker{{ '-' + docker_version }} state=present
- service: name=docker state=started
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
index 57b156b1c..57d4fe4b6 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
@@ -42,7 +42,7 @@
when: (embedded_etcd | bool) and (etcd_disk_usage.stdout|int > avail_disk.stdout|int)
- name: Install etcd (for etcdctl)
- action: "{{ ansible_pkg_mgr }} name=etcd state=present"
+ package: name=etcd state=present
when: not openshift.common.is_atomic | bool
- name: Generate etcd backup
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml b/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml
index 35f391f8c..f88981a0b 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml
@@ -30,7 +30,7 @@
## will fail on atomic host. We need to revisit how to do etcd backups there as
## the container may be newer than etcdctl on the host. Assumes etcd3 obsoletes etcd (7.3.1)
- name: Upgrade etcd for etcdctl when not atomic
- action: "{{ ansible_pkg_mgr }} name=etcd ensure=latest"
+ package: name=etcd state=latest
when: not openshift.common.is_atomic | bool
- name: Verify cluster is healthy
diff --git a/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml
index cd1139b29..d7d1fe548 100644
--- a/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml
@@ -1,9 +1,10 @@
+---
# We verified latest rpm available is suitable, so just yum update.
- name: Upgrade packages
- action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-{{ component }}{{ openshift_pkg_version }} state=present"
+ package: "name={{ openshift.common.service_type }}-{{ component }}{{ openshift_pkg_version }} state=present"
- name: Ensure python-yaml present for config upgrade
- action: "{{ ansible_pkg_mgr }} name=PyYAML state=present"
+ package: name=PyYAML state=present
when: not openshift.common.is_atomic | bool
- name: Restart node service