Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/clean cloudflare #17

Merged
merged 3 commits into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/getting_started/clean-up.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ To release the resources, please run::
terraform destroy <cloud-provider>

``<cloud-provider>`` can be "openstack", "gce" or "aws".

To delete the Clouflare DNS records, please run::

ansible-playbook playbooks/clean-cloudflare.yml

**Warning:** if you create a new cluster before deleting the DNS records, the Ansible inventory will be replaced and you will have to delete the records manually.
6 changes: 6 additions & 0 deletions playbooks/clean-cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- hosts: edge
gather_facts: False
vars:
cf_state: "absent"
roles:
- { role: ../stacks/traefik-lb/roles/cloudflare }
2 changes: 1 addition & 1 deletion stacks/traefik-lb/roles/cloudflare/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
record: "{{ cf_record }}"
type: A
value: "{{ ansible_ssh_host }}"
state: "present"
state: "{{ cf_state | default('present') }}"
account_email: "{{ cf_mail }}"
account_api_token: "{{ cf_token }}"