summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-12-09 15:49:48 -0500
committerThomas Wiest <twiest@users.noreply.github.com>2015-12-09 15:49:48 -0500
commiteeb164fae0e6721100c4fcc1717d92bb85b9652c (patch)
tree70eee046db8012061c178ab4e686650048265564 /playbooks/adhoc
parent898290cb3aabbc9d98883181877ac857a2fe1faf (diff)
parent14c69ad397be8ee101ef5b4edfa223d703e67ad0 (diff)
downloadopenshift-eeb164fae0e6721100c4fcc1717d92bb85b9652c.tar.gz
openshift-eeb164fae0e6721100c4fcc1717d92bb85b9652c.tar.bz2
openshift-eeb164fae0e6721100c4fcc1717d92bb85b9652c.tar.xz
openshift-eeb164fae0e6721100c4fcc1717d92bb85b9652c.zip
Merge pull request #1048 from twiest/prod
Sync master -> Prod
Diffstat (limited to 'playbooks/adhoc')
-rw-r--r--playbooks/adhoc/bootstrap-fedora.yml5
-rw-r--r--playbooks/adhoc/uninstall.yml48
2 files changed, 47 insertions, 6 deletions
diff --git a/playbooks/adhoc/bootstrap-fedora.yml b/playbooks/adhoc/bootstrap-fedora.yml
new file mode 100644
index 000000000..de9f36c8a
--- /dev/null
+++ b/playbooks/adhoc/bootstrap-fedora.yml
@@ -0,0 +1,5 @@
+- hosts: OSv3
+ gather_facts: false
+ tasks:
+ - name: install python and deps for ansible modules
+ raw: dnf install -y python2 python2-dnf libselinux-python libsemanage-python
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index 565bb20a8..08a2ea6fb 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -48,7 +48,39 @@
- pcsd
- yum: name={{ item }} state=absent
- when: not is_atomic | bool
+ 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
+
+ - dnf: name={{ item }} state=absent
+ when: ansible_pkg_mgr == "dnf" and not is_atomic | bool
with_items:
- atomic-enterprise
- atomic-enterprise-master
@@ -111,12 +143,12 @@
- atomic-enterprise
- origin
- - shell: docker ps -a | grep Exited | grep "{{ item }}" | awk '{print $1}'
+ - shell: docker ps -a | grep Exited | egrep "{{ item }}" | awk '{print $1}'
changed_when: False
failed_when: False
register: exited_containers_to_delete
with_items:
- - aep3/aep
+ - aep3.*/aep
- openshift3/ose
- openshift/origin
@@ -125,13 +157,13 @@
failed_when: False
with_items: "{{ exited_containers_to_delete.results }}"
- - shell: docker images | grep {{ item }} | awk '{ print $3 }'
+ - shell: docker images | egrep {{ item }} | awk '{ print $3 }'
changed_when: False
failed_when: False
register: images_to_delete
with_items:
- - registry.access.redhat.com/openshift3
- - registry.access.redhat.com/aep3
+ - registry\.access\..*redhat\.com/openshift3
+ - registry\.access\..*redhat\.com/aep3
- docker.io/openshift
- shell: "docker rmi -f {{ item.stdout_lines | join(' ') }}"
@@ -161,6 +193,7 @@
- /etc/sysconfig/origin-master-api
- /etc/sysconfig/origin-master-controllers
- /etc/sysconfig/origin-node
+ - /etc/systemd/system/atomic-openshift-node.service.wants
- /root/.kube
- /run/openshift-sdn
- /usr/share/openshift/examples
@@ -180,5 +213,8 @@
- name: Reload systemd manager configuration
command: systemctl daemon-reload
+- hosts: nodes
+ sudo: yes
+ tasks:
- name: restart docker
service: name=docker state=restarted