summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/uninstall_ssh_keys.yml
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-22 15:56:47 -0800
committerGitHub <noreply@github.com>2018-01-22 15:56:47 -0800
commit0acd0b6cceab794eeff005a3cde2fdc8221bbb0e (patch)
tree2d4544863b03854269ef1b343f91e0ef6460e3d1 /roles/openshift_aws/tasks/uninstall_ssh_keys.yml
parentb79b497a9a443140f23cd3b8ef5c19d1893bce95 (diff)
parenta0015f7ead6a89dbb602bc245b51e82cfad66902 (diff)
downloadopenshift-0acd0b6cceab794eeff005a3cde2fdc8221bbb0e.tar.gz
openshift-0acd0b6cceab794eeff005a3cde2fdc8221bbb0e.tar.bz2
openshift-0acd0b6cceab794eeff005a3cde2fdc8221bbb0e.tar.xz
openshift-0acd0b6cceab794eeff005a3cde2fdc8221bbb0e.zip
Merge pull request #6533 from joelddiaz/prereqs_uninstall
Automatic merge from submit-queue. 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.
Diffstat (limited to 'roles/openshift_aws/tasks/uninstall_ssh_keys.yml')
-rw-r--r--roles/openshift_aws/tasks/uninstall_ssh_keys.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/openshift_aws/tasks/uninstall_ssh_keys.yml b/roles/openshift_aws/tasks/uninstall_ssh_keys.yml
new file mode 100644
index 000000000..27e42da53
--- /dev/null
+++ b/roles/openshift_aws/tasks/uninstall_ssh_keys.yml
@@ -0,0 +1,9 @@
+---
+- name: Remove the public keys for the user(s)
+ ec2_key:
+ state: absent
+ name: "{{ item.key_name }}"
+ region: "{{ openshift_aws_region }}"
+ with_items: "{{ openshift_aws_users }}"
+ no_log: True
+ when: openshift_aws_enable_uninstall_shared_objects | bool