Skip to content

Commit

Permalink
Merge pull request #17 from mcapuccini/feature/clean-cloudflare
Browse files Browse the repository at this point in the history
Feature/clean cloudflare
  • Loading branch information
mcapuccini authored Nov 2, 2016
2 parents 11e3c8c + 18d16fc commit 7be8fba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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 }}"

0 comments on commit 7be8fba

Please sign in to comment.