Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 75db92f

Browse files
committed
fix: drop cloudflare email
1 parent d693f6f commit 75db92f

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ jobs:
8989
webserver: '${{ env.WEBSERVER }}'
9090
container: '${{ env.CONTAINER }}'
9191
dns: '${{ env.DNS }}'
92-
dns_cloudflare_email: '${{ secrets.CLOUDFLARE_EMAIL }}'
9392
dns_cloudflare_apitoken: '${{ secrets.CLOUDFLARE_TOKEN }}'
9493
rolename: '${{ env.ROLE_NAME }}'
9594
- name: Remove Hetzner server

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ all:
3030

3131
## Configuration
3232

33-
Make sure to provide the email and API token for Cloudflare via StackHead CLI configuration file:
33+
Make sure to provide the API token for Cloudflare via StackHead CLI configuration file.
34+
35+
You can generate an API token [in your Cloudflare profile](https://dash.cloudflare.com/profile/api-tokens).
36+
Make sure to grant `write` permissions to DNS on Zone level.
3437

3538
```yaml
3639
config:
3740
deployment:
3841
getstackhead.stackhead_dns_cloudflare:
39-
cloudflare_email: my@email.address
4042
cloudflare_api_token: MY-API-TOKEN
4143
```
4244
@@ -45,7 +47,6 @@ or Ansible inventory:
4547
```yaml
4648
stackhead__config_deployment:
4749
getstackhead.stackhead_dns_cloudflare:
48-
cloudflare_email: my@email.address
4950
cloudflare_api_token: MY-API-TOKEN
5051
```
5152

tasks/steps/deploy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
- name: Check Cloudflare credentials
44
assert:
55
that:
6-
- module.config.cloudflare_email|d("") != ""
76
- module.config.cloudflare_api_token|d("") != ""
87
- name: "Create A record for domain {{ item.domain }}"
98
cloudflare_dns:
109
zone: "{{ item.domain|getstackhead.stackhead.domain }}"
1110
record: "{{ item.domain|getstackhead.stackhead.subdomain|d('@', true) }}"
1211
type: A
1312
value: "{{ ansible_ssh_host }}"
14-
account_email: "{{ module.config.cloudflare_email }}"
15-
account_api_token: "{{ module.config.cloudflare_api_token }}"
13+
api_token: "{{ module.config.cloudflare_api_token }}"
1614
proxied: no
1715
solo: yes
1816
state: present

tasks/steps/destroy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
- name: Check Cloudflare credentials
44
assert:
55
that:
6-
- module.config.cloudflare_email|d("") != ""
76
- module.config.cloudflare_api_token|d("") != ""
87
- name: "Remove A record for domain {{ item.domain }}"
98
cloudflare_dns:
109
zone: "{{ item.domain|getstackhead.stackhead.domain }}"
1110
record: "{{ item.domain|getstackhead.stackhead.subdomain|d('@', true) }}"
1211
type: A
1312
value: "{{ ansible_ssh_host }}"
14-
account_email: "{{ module.config.cloudflare_email }}"
15-
account_api_token: "{{ module.config.cloudflare_api_token }}"
13+
api_token: "{{ module.config.cloudflare_api_token }}"
1614
state: absent
1715
when: item.dns.provider|d('') == 'cloudflare'
1816
with_items: "{{ app_config.domains }}" # item.domain

0 commit comments

Comments
 (0)