Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Moved code to destroy install-repos to its own command.
Browse files Browse the repository at this point in the history
This is foir issue #72
  • Loading branch information
rmkraus committed Jun 29, 2021
1 parent 40cea7a commit 31a1e26
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
35 changes: 35 additions & 0 deletions app/playbooks/destroy.d/install-repos/destroy.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions app/playbooks/destroy.d/install-repos/main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

ME=$(dirname $0)

ansible-playbook $ME/destroy.yml $@ || exit 1

0 comments on commit 31a1e26

Please sign in to comment.