Add new hosts and fix some ansible semantics
This commit is contained in:
parent
96a7763933
commit
6b208a768a
@ -7,3 +7,6 @@ devops.benhays.cloud heartbeat_url="https://uptime.betterstack.com/api/v1/heartb
|
|||||||
tailscale.benhays.cloud heartbeat_url='https://uptime.betterstack.com/api/v1/heartbeat/Sp7CXapJDwtjQmCMVdjeQsMy' # <--- All the rest are Ubuntu 22.04
|
tailscale.benhays.cloud heartbeat_url='https://uptime.betterstack.com/api/v1/heartbeat/Sp7CXapJDwtjQmCMVdjeQsMy' # <--- All the rest are Ubuntu 22.04
|
||||||
bitwarden.benhays.cloud heartbeat_url='https://uptime.betterstack.com/api/v1/heartbeat/YUBUtgJjBDJKEqM1qUXroj1v' # <---
|
bitwarden.benhays.cloud heartbeat_url='https://uptime.betterstack.com/api/v1/heartbeat/YUBUtgJjBDJKEqM1qUXroj1v' # <---
|
||||||
nextcloud.benhays.cloud heartbeat_url='https://uptime.betterstack.com/api/v1/heartbeat/oijvrZGFtc9Dev2AefP8iTfB' # <---
|
nextcloud.benhays.cloud heartbeat_url='https://uptime.betterstack.com/api/v1/heartbeat/oijvrZGFtc9Dev2AefP8iTfB' # <---
|
||||||
|
irc.benhays.cloud
|
||||||
|
dns01.benhays.cloud
|
||||||
|
dns02.benhays.cloud
|
@ -16,6 +16,7 @@
|
|||||||
ansible.builtin.import_tasks: ../roles/cloudflare-dns.yml
|
ansible.builtin.import_tasks: ../roles/cloudflare-dns.yml
|
||||||
- name: Heartbeat Cronjob for Betterstack
|
- name: Heartbeat Cronjob for Betterstack
|
||||||
ansible.builtin.import_tasks: ../roles/heartbeat.yml
|
ansible.builtin.import_tasks: ../roles/heartbeat.yml
|
||||||
|
when: heartbeat_url is defined
|
||||||
- name: OpenSSH Hardening
|
- name: OpenSSH Hardening
|
||||||
ansible.builtin.import_tasks: ../roles/openssh.yml
|
ansible.builtin.import_tasks: ../roles/openssh.yml
|
||||||
- name: Generic Debian Hardening
|
- name: Generic Debian Hardening
|
||||||
|
@ -5,21 +5,25 @@
|
|||||||
mode: "0700"
|
mode: "0700"
|
||||||
src: ../../Scripts/cloudflare-dns.sh
|
src: ../../Scripts/cloudflare-dns.sh
|
||||||
dest: /opt/cloudflare-dns.sh
|
dest: /opt/cloudflare-dns.sh
|
||||||
|
changed_when: false
|
||||||
- name: Insert API Token
|
- name: Insert API Token
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: "/opt/cloudflare-dns.sh"
|
path: "/opt/cloudflare-dns.sh"
|
||||||
regexp: "^cloudflare_zone_api_token=''"
|
regexp: "^cloudflare_zone_api_token=''"
|
||||||
replace: "cloudflare_zone_api_token='{{ CF_API_TOKEN }}'"
|
replace: "cloudflare_zone_api_token='{{ CF_API_TOKEN }}'"
|
||||||
|
changed_when: false
|
||||||
- name: Insert Zone ID
|
- name: Insert Zone ID
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: "/opt/cloudflare-dns.sh"
|
path: "/opt/cloudflare-dns.sh"
|
||||||
regexp: "^zoneid=''"
|
regexp: "^zoneid=''"
|
||||||
replace: "zoneid='{{ CF_ZONE_ID }}'"
|
replace: "zoneid='{{ CF_ZONE_ID }}'"
|
||||||
- name: Insert Zone ID
|
changed_when: false
|
||||||
|
- name: Insert DNS Record
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: "/opt/cloudflare-dns.sh"
|
path: "/opt/cloudflare-dns.sh"
|
||||||
regexp: "^dns_record=''"
|
regexp: "^dns_record=''"
|
||||||
replace: "dns_record='{{ inventory_hostname }}'"
|
replace: "dns_record='{{ inventory_hostname }}'"
|
||||||
|
changed_when: false
|
||||||
- name: Add Cronjob for IPAM Script
|
- name: Add Cronjob for IPAM Script
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
name: "Cloudflare IPAM Script"
|
name: "Cloudflare IPAM Script"
|
||||||
|
@ -42,3 +42,5 @@
|
|||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: ssh
|
name: ssh
|
||||||
state: restarted
|
state: restarted
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user