From 8145bf8f9103e1914ca8b7b957aa63ecd6e5d950 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Sat, 6 Feb 2021 23:21:48 -0500 Subject: [PATCH] Added domains: g0v.ca, c4nada.ca, t0ronto.ca. Added redirects via @ronnywang infra. --- README.md | 25 +++++++++++++++++++------ c4nada.ca./c4nada.ca.yaml | 18 ++++++++++++++++++ config.yaml | 15 +++++++++++++++ g0v.ca./g0v.ca.yaml | 18 ++++++++++++++++++ g0v.network./g0v.network.yaml | 2 ++ sample.env | 2 +- t0ronto.ca./t0ronto.ca.yaml | 18 ++++++++++++++++++ 7 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 c4nada.ca./c4nada.ca.yaml create mode 100644 g0v.ca./g0v.ca.yaml create mode 100644 t0ronto.ca./t0ronto.ca.yaml diff --git a/README.md b/README.md index 0801395..3b5dc85 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,14 @@ # g0v.network domains -For automating management of the `g0v.network` domain via config files. +For automating management of some g0v-related domains via config files. -Changing or adding DNS records in `main` branach of this repository with update +The following damains can be managed here: +- g0v.network +- g0v.ca +- c4nada.ca +- t0ronto.ca + +Changing or adding DNS records in `main` branch of this repository with update the actual domain records. Inspired by [`g0v/domain`][g0v/domain] @@ -37,11 +43,13 @@ see example): ### Delete an existing subdomain -Delete a file or a specific record type within a file. Our automation will sync this deletion when it runs. +Delete a file or a specific record type within a file. Our automation will sync +this deletion when it runs. ### Modify an existing subdomain -Modify an [existing file][existing]. Our automation will sync this change when it runs. +Modify an [existing file][existing]. Our automation will sync this change when +it runs. [existing]: /g0v.network./g0v.network.yaml @@ -51,7 +59,11 @@ To contribute changes to our automation, you'll likely want to be able to run it - Python 3 - Cloudflare account -- Cloudflare site: `g0v.network` (can "fake it", no need to actually have access to it) +- Cloudflare sites: (can "fake it"; no need to actually have access to it) + - `g0v.network` + - `g0v.ca` + - `c4nada.ca` + - `t0ronto.ca` - Cloudflare API token (see instructions in `sample.env`) ``` @@ -79,7 +91,8 @@ pipenv run octodns-sync --config-file config.yaml --doit ## :muscle: Contributing -Please open an issue or pull request in order to apply for a new subdomain. +Please open an issue or pull request in order to create/update/delete any +subdomains. ## :copyright: License diff --git a/c4nada.ca./c4nada.ca.yaml b/c4nada.ca./c4nada.ca.yaml new file mode 100644 index 0000000..d6d5c7b --- /dev/null +++ b/c4nada.ca./c4nada.ca.yaml @@ -0,0 +1,18 @@ +--- +'': + - type: TXT + values: + # Who has admin for g0v.ca domain + - admin=patcon + # Used for redirect service below + - 301 https://g0v.tw/ + - type: A + # See: https://301.ronny.tw/ + value: 52.69.187.52 + octodns: + cloudflare: + proxied: true + metdata: + repository: https://github.com/ronnywang/301-service + maintainer: + - ronnywang diff --git a/config.yaml b/config.yaml index a8e0d5b..3d10aed 100644 --- a/config.yaml +++ b/config.yaml @@ -20,3 +20,18 @@ zones: - config-files targets: - cloudflare + g0v.ca.: + sources: + - config-files + targets: + - cloudflare + t0ronto.ca.: + sources: + - config-files + targets: + - cloudflare + c4nada.ca.: + sources: + - config-files + targets: + - cloudflare diff --git a/g0v.ca./g0v.ca.yaml b/g0v.ca./g0v.ca.yaml new file mode 100644 index 0000000..d6d5c7b --- /dev/null +++ b/g0v.ca./g0v.ca.yaml @@ -0,0 +1,18 @@ +--- +'': + - type: TXT + values: + # Who has admin for g0v.ca domain + - admin=patcon + # Used for redirect service below + - 301 https://g0v.tw/ + - type: A + # See: https://301.ronny.tw/ + value: 52.69.187.52 + octodns: + cloudflare: + proxied: true + metdata: + repository: https://github.com/ronnywang/301-service + maintainer: + - ronnywang diff --git a/g0v.network./g0v.network.yaml b/g0v.network./g0v.network.yaml index 91e8e7b..a4e9650 100644 --- a/g0v.network./g0v.network.yaml +++ b/g0v.network./g0v.network.yaml @@ -1,5 +1,7 @@ --- '': + - type: TXT + value: admin=patcon - type: A value: 162.247.75.222 octodns: diff --git a/sample.env b/sample.env index cc14fa5..e31c0f3 100644 --- a/sample.env +++ b/sample.env @@ -1,4 +1,4 @@ # See: https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys # Create a token from the template: "Edit zone DNS" -# We advise scoping it only specific domains you wish to manage via this automation. +# We advise scoping it only the specific domains you wish to manage via this automation. CLOUDFLARE_API_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/t0ronto.ca./t0ronto.ca.yaml b/t0ronto.ca./t0ronto.ca.yaml new file mode 100644 index 0000000..d6d5c7b --- /dev/null +++ b/t0ronto.ca./t0ronto.ca.yaml @@ -0,0 +1,18 @@ +--- +'': + - type: TXT + values: + # Who has admin for g0v.ca domain + - admin=patcon + # Used for redirect service below + - 301 https://g0v.tw/ + - type: A + # See: https://301.ronny.tw/ + value: 52.69.187.52 + octodns: + cloudflare: + proxied: true + metdata: + repository: https://github.com/ronnywang/301-service + maintainer: + - ronnywang