summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2015-12-09 15:06:48 -0500
committerScott Dodson <sdodson@redhat.com>2015-12-09 16:43:27 -0500
commitb1d30491f1581503003646684137bf2c218660ba (patch)
treecba54e9138630742d0788a5cff9f70ec75b93032 /playbooks
parentecae1fcaaf6d83f2fb6dce0624990b2d13c25db9 (diff)
downloadopenshift-b1d30491f1581503003646684137bf2c218660ba.tar.gz
openshift-b1d30491f1581503003646684137bf2c218660ba.tar.bz2
openshift-b1d30491f1581503003646684137bf2c218660ba.tar.xz
openshift-b1d30491f1581503003646684137bf2c218660ba.zip
Remove yum / dnf duplication
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/adhoc/uninstall.yml38
-rw-r--r--playbooks/aws/ansible-tower/launch.yml4
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml4
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml20
-rw-r--r--playbooks/common/openshift-master/config.yml2
5 files changed, 14 insertions, 54 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index d1bb2298a..9161076e5 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -47,42 +47,8 @@
- origin-node
- pcsd
- - yum: name={{ item }} state=absent
- when: ansible_pkg_mgr == "yum" and not is_atomic | bool
- with_items:
- - atomic-enterprise
- - atomic-enterprise-master
- - atomic-enterprise-node
- - atomic-enterprise-sdn-ovs
- - atomic-openshift
- - atomic-openshift-clients
- - atomic-openshift-master
- - atomic-openshift-node
- - atomic-openshift-sdn-ovs
- - corosync
- - etcd
- - openshift
- - openshift-master
- - openshift-node
- - openshift-sdn
- - openshift-sdn-ovs
- - openvswitch
- - origin
- - origin-clients
- - origin-master
- - origin-node
- - origin-sdn-ovs
- - pacemaker
- - pcs
- - tuned-profiles-atomic-enterprise-node
- - tuned-profiles-atomic-openshift-node
- - tuned-profiles-openshift-node
- - tuned-profiles-origin-node
-
- - user: name=hacluster state=absent
-
- - dnf: name={{ item }} state=absent
- when: ansible_pkg_mgr == "dnf" and not is_atomic | bool
+ - action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+ when: not is_atomic | bool
with_items:
- atomic-enterprise
- atomic-enterprise-master
diff --git a/playbooks/aws/ansible-tower/launch.yml b/playbooks/aws/ansible-tower/launch.yml
index 850238ffb..fd6b15c32 100644
--- a/playbooks/aws/ansible-tower/launch.yml
+++ b/playbooks/aws/ansible-tower/launch.yml
@@ -71,8 +71,8 @@
tasks:
- - name: Yum update
- yum: name=* state=latest
+ - name: Update All Things
+ action: "{{ ansible_pkg_mgr }} name=* state=latest"
# Apply the configs, seprate so that just the configs can be run by themselves
- include: config.yml
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
index 9f7e49b93..63c8ef756 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
@@ -11,7 +11,7 @@
openshift_version: "{{ openshift_pkg_version | default('') }}"
tasks:
- name: Upgrade master packages
- yum: pkg={{ openshift.common.service_type }}-master{{ openshift_version }} state=latest
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_version }} state=latest"
- name: Restart master services
service: name="{{ openshift.common.service_type}}-master" state=restarted
@@ -21,7 +21,7 @@
openshift_version: "{{ openshift_pkg_version | default('') }}"
tasks:
- name: Upgrade node packages
- yum: pkg={{ openshift.common.service_type }}-node{{ openshift_version }} state=latest
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-node{{ openshift_version }} state=latest"
- name: Restart node services
service: name="{{ openshift.common.service_type }}-node" state=restarted
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 0309e8a77..c31103f3e 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
@@ -54,8 +54,8 @@
- name: Verify upgrade can proceed
hosts: oo_masters_to_config:oo_nodes_to_config
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' }}"
@@ -149,9 +149,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: >
@@ -222,17 +220,13 @@
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"
- name: Upgrade master configuration
openshift_upgrade_config:
@@ -380,7 +374,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
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index 196cdc8fe..d6d6e1cf4 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -245,7 +245,7 @@
msg: "openshift_master_session_auth_secrets and openshift_master_encryption_secrets must be equal length"
when: (openshift_master_session_auth_secrets is defined and openshift_master_session_encryption_secrets is defined) and (openshift_master_session_auth_secrets | length != openshift_master_session_encryption_secrets | length)
- name: Install OpenSSL package
- action: "{{ansible_pkg_mgr}} pkg=openssl state=present"
+ action: "{{ ansible_pkg_mgr }} name=openssl state=present"
- name: Generate session authentication key
command: /usr/bin/openssl rand -base64 24
register: session_auth_output