Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opendatach/playbook
Opendata.ch Ansible Playbook
https://github.com/opendatach/playbook
ansible
Last synced: 10 days ago
JSON representation
Opendata.ch Ansible Playbook
- Host: GitHub
- URL: https://github.com/opendatach/playbook
- Owner: OpendataCH
- Created: 2016-04-30T17:10:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T18:37:14.000Z (about 1 month ago)
- Last Synced: 2024-10-20T03:04:03.233Z (29 days ago)
- Topics: ansible
- Language: Jinja
- Homepage:
- Size: 157 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Opendata.ch Ansible Playbook
## Usage
Most changes can be made in the file `vars.yml`. Commit and push your changes
to [GitHub](https://github.com/OpendataCH/playbook)
and [GitHub Actions](https://github.com/OpendataCH/playbook/actions) will execute the
following command which applies the changes to the server:```
ansible-playbook site.yml
```### Deleting a DNS record
Note that DNS records are only added or updated with the playbook. If you want
to delete a DNS record, you have to manually do so. This also applies when
changing the type of a DNS record as that's basically a delete and create.You can find the `CLOUDFLARE_API_TOKEN` in the Vault.
Fetch records:
```
curl "https://api.cloudflare.com/client/v4/zones/c70c67baa5ba6666d60303664a926522/dns_records?per_page=100" \
-H 'X-Auth-Email: [email protected]' \
-H 'X-Auth-Key: CLOUDFLARE_API_TOKEN'
```Delete record:
```
curl -X "DELETE" "https://api.cloudflare.com/client/v4/zones/c70c67baa5ba6666d60303664a926522/dns_records/DNS_RECORD_ID" \
-H 'X-Auth-Email: [email protected]' \
-H 'X-Auth-Key: CLOUDFLARE_API_TOKEN'
```## Vault
To access the Vault a file with the name `vault_password.txt` needs to exist in
the root directory of the project. Ask me for the file.```
ansible-vault edit vault.yml
```## Installation
Only needed if you want to run Ansible locally to debug something.
```
pip install ansible
```