From ce77a5d779531fee60999f1b91aa43079721ec9b Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 19 Sep 2023 22:26:11 -0400 Subject: [PATCH] fix zonedit dynamic ip for root xai-corp --- .idea/kubernetes-settings.xml | 6 +++++ .idea/php-docker-settings.xml | 24 +++++++++++++++++++ ansible-5/inventory.ini | 2 +- .../ns.xai-corp.net/tasks/dynamic_ip.yml | 12 ++++++++-- ansible-5/roles/prod.k3s/defaults/main.yml | 2 +- .../prod.k3s/files/funkwhale/values.yaml | 5 ++++ .../prod.k3s/files/hello-world/ingress.yaml | 20 ++++++++-------- .../roles/prod.k3s/files/stash/values.yaml | 2 +- ansible-5/roles/prod.k3s/tasks/main.yml | 6 ++--- 9 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 .idea/kubernetes-settings.xml create mode 100644 .idea/php-docker-settings.xml diff --git a/.idea/kubernetes-settings.xml b/.idea/kubernetes-settings.xml new file mode 100644 index 0000000..d4eed8b --- /dev/null +++ b/.idea/kubernetes-settings.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/php-docker-settings.xml b/.idea/php-docker-settings.xml new file mode 100644 index 0000000..2f147d1 --- /dev/null +++ b/.idea/php-docker-settings.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ansible-5/inventory.ini b/ansible-5/inventory.ini index 7723e0e..63cc9f3 100644 --- a/ansible-5/inventory.ini +++ b/ansible-5/inventory.ini @@ -8,7 +8,7 @@ cubox-m ansible_ssh_host=192.168.4.15 [ns] ;home ansible_ssh_host=192.168.4.11 cubox-i ansible_ssh_host=192.168.4.12 -cubox-m ansible_ssh_host=192.168.4.15 +;cubox-m ansible_ssh_host=192.168.4.15 [gfs] ;home ansible_ssh_host=192.168.4.11 diff --git a/ansible-5/roles/ns.xai-corp.net/tasks/dynamic_ip.yml b/ansible-5/roles/ns.xai-corp.net/tasks/dynamic_ip.yml index 0f99be2..bd0e2c3 100644 --- a/ansible-5/roles/ns.xai-corp.net/tasks/dynamic_ip.yml +++ b/ansible-5/roles/ns.xai-corp.net/tasks/dynamic_ip.yml @@ -9,9 +9,17 @@ - cron when: ansible_os_family == "Debian" -- name: create zone edit cronjob +- name: xai-corp.net zone edit cronjob cron: - name: zoneedit + name: xai-corp.net + minute: "*/35" + user: root + job: 'IP=`curl -s http://api.ipify.org` && wget -O - --http-user=rmorgan15 --http-passwd=D422B334D3768ACD "https://dynamic.zoneedit.com/auth/dynamic.html?host=xai-corp.net&dnsto=$IP" &>/dev/null' + cron_file: zoneedit + +- name: test.xai-corp.net zone edit cronjob + cron: + name: test.xai-corp.net minute: "*/45" user: root job: 'IP=`curl -s http://api.ipify.org` && wget -O - --http-user=rmorgan15 --http-passwd=D422B334D3768ACD "https://dynamic.zoneedit.com/auth/dynamic.html?host=test.xai-corp.net&dnsto=$IP" &>/dev/null' diff --git a/ansible-5/roles/prod.k3s/defaults/main.yml b/ansible-5/roles/prod.k3s/defaults/main.yml index b343244..6b7b764 100644 --- a/ansible-5/roles/prod.k3s/defaults/main.yml +++ b/ansible-5/roles/prod.k3s/defaults/main.yml @@ -84,7 +84,7 @@ apps: hello_world: enabled: true namespace: default - state: present + state: absent funkwhale: enabled: true diff --git a/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml b/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml index 9636420..9468bdc 100644 --- a/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml +++ b/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml @@ -1,7 +1,12 @@ --- # Funkwhale values # https://gitlab.com/ananace/charts/-/tree/master/charts/funkwhale +# https://hub.docker.com/r/funkwhale/api +image: + registry: docker.io/funkwhale + tag: stable + pullPolicy: IfNotPresent ingress: enabled: true diff --git a/ansible-5/roles/prod.k3s/files/hello-world/ingress.yaml b/ansible-5/roles/prod.k3s/files/hello-world/ingress.yaml index b396479..4303d78 100644 --- a/ansible-5/roles/prod.k3s/files/hello-world/ingress.yaml +++ b/ansible-5/roles/prod.k3s/files/hello-world/ingress.yaml @@ -20,16 +20,16 @@ spec: name: hello-world port: number: 80 - - host: xai-corp.net - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: hello-world - port: - number: 80 +# - host: xai-corp.net +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: hello-world +# port: +# number: 80 tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames - secretName: xai-corp-production-tls diff --git a/ansible-5/roles/prod.k3s/files/stash/values.yaml b/ansible-5/roles/prod.k3s/files/stash/values.yaml index 764557c..d3bc8a0 100644 --- a/ansible-5/roles/prod.k3s/files/stash/values.yaml +++ b/ansible-5/roles/prod.k3s/files/stash/values.yaml @@ -5,7 +5,7 @@ image: repository: stashapp/stash - tag: v0.21.0 + tag: v0.22.1 ingress: main: diff --git a/ansible-5/roles/prod.k3s/tasks/main.yml b/ansible-5/roles/prod.k3s/tasks/main.yml index cb6197f..6677136 100644 --- a/ansible-5/roles/prod.k3s/tasks/main.yml +++ b/ansible-5/roles/prod.k3s/tasks/main.yml @@ -7,13 +7,13 @@ ## add helm repositories #- include_tasks: add_repos.yml # -- name: deploy cert_manager - include_tasks: cert_manager.yml - - name: deploy hello-world include_tasks: deployments/hello-world.yaml when: apps.hello_world.enabled +- name: deploy cert_manager + include_tasks: cert_manager.yml + - name: deploy stash include_tasks: deployments/stash.yaml when: apps.stash.enabled