From a0015f7ead6a89dbb602bc245b51e82cfad66902 Mon Sep 17 00:00:00 2001 From: Joel Diaz Date: Wed, 20 Dec 2017 01:22:23 +0000 Subject: allow uninstalling AWS objects created by prerequisite playbook add deprovisioners/uninstallers for objects created via playbooks/aws/openshift-cluster/prerequisites.yml specifically: security groups, vpcs, and any ssh keys introduce openshift_aws_enable_uninstall_shared_objects to protect AWS objects that would be shared in the case of multiple clusters co-existing in one AWS account. right now it protects the ssh keys, but it can/should be used to protect against deleting the shared IAM instance profile as well. default this variable to False to be on the safe side when uninstalling/deprovisioning. add some documentation on using deprovisioning playbooks --- playbooks/aws/openshift-cluster/uninstall_ssh_keypair.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 playbooks/aws/openshift-cluster/uninstall_ssh_keypair.yml (limited to 'playbooks/aws/openshift-cluster/uninstall_ssh_keypair.yml') diff --git a/playbooks/aws/openshift-cluster/uninstall_ssh_keypair.yml b/playbooks/aws/openshift-cluster/uninstall_ssh_keypair.yml new file mode 100644 index 000000000..ec9caa51b --- /dev/null +++ b/playbooks/aws/openshift-cluster/uninstall_ssh_keypair.yml @@ -0,0 +1,10 @@ +--- +- hosts: localhost + connection: local + gather_facts: no + tasks: + - name: remove ssh keypair(s) + include_role: + name: openshift_aws + tasks_from: uninstall_ssh_keys.yml + when: openshift_aws_users | default([]) | length > 0 -- cgit v1.2.3