diff --git a/app/playbooks/destroy.d/install-repos/destroy.yml b/app/playbooks/destroy.d/install-repos/destroy.yml new file mode 100755 index 0000000..f26f95b --- /dev/null +++ b/app/playbooks/destroy.d/install-repos/destroy.yml @@ -0,0 +1,35 @@ +#!/usr/bin/env ansible-playbook + +- name: Clean coreos install repos + hosts: bastion + become: yes + gather_facts: no + + tasks: + - name: erase stored images and igniton configs + shell: rm -f /var/www/html/* + + - name: erase pxelinux boot kickstarts + file: + path: /var/lib/tftpboot/pxelinux.cfg + state: absent + + - name: erase uefi grub kickstarts + file: + path: /var/lib/tftpboot/uefi + state: absent + + - name: erase coreos boot images + file: + path: /var/lib/tftpboot/rhcos + state: absent + +- name: Purge openshift installation resource caches + hosts: localhost + gather_facts: no + + tasks: + - name: remove installer data cache + file: + path: /data/openshift-installer + state: absent diff --git a/app/playbooks/destroy.d/install-repos/main.sh b/app/playbooks/destroy.d/install-repos/main.sh new file mode 100755 index 0000000..153b172 --- /dev/null +++ b/app/playbooks/destroy.d/install-repos/main.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +ME=$(dirname $0) + +ansible-playbook $ME/destroy.yml $@ || exit 1