Compare commits

...

5 Commits

Author SHA1 Message Date
7f6d52cfd6 [deploy-opentofu]
[deploy-opentofu]
2026-09-15 19:36:54 +00:00
08d06c4205 [deploy-opentofu]
[deploy-opentofu]
2026-09-15 17:02:58 +00:00
b0875725c0 Update roles/uptime-kuma/tasks/main.yml 2026-09-15 17:02:21 +00:00
74108ecd4d ops delete teste.yaml [deploy-opentofu]
ops delete teste.yaml [deploy-opentofu]
2026-09-15 16:22:00 +00:00
c362680267 metrics are needed [deploy-opentofu]
metrics are needed [deploy-opentofu]
2026-09-15 15:50:20 +00:00
5 changed files with 46 additions and 4 deletions

2
ansible.cfg Normal file
View File

@ -0,0 +1,2 @@
[defaults]
timeout = 60

Binary file not shown.

View File

@ -0,0 +1,40 @@
- name: Remover o diretório /tmp/metrics/kubernetes-files
ansible.builtin.file:
path: /tmp/metrics/kubernetes-files
state: absent
- name: Criar diretório temporário no remoto
file:
path: /tmp/metrics/kubernetes-files
state: directory
mode: '0755'
#- name: Copy file with owner and permissions
# ansible.builtin.copy:
# src: ../files
# dest: /tmp/metrics/kubernetes-files
# owner: fenix
# group: root
# mode: '0644'
#- name: Listar conteúdo do diretório remoto
# shell: ls -l /tmp/metrics/kubernetes-files/files
# register: resultado_ls
#- name: Mostrar resultado do ls
# debug:
# var: resultado_ls.stdout_lines
- name: Aplicar o files
become: yes
become_user: fenix
shell: |
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl patch deployment metrics-server -n kube-system --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"},{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-preferred-address-types=InternalIP"}]'
environment:
KUBECONFIG: /home/fenix/.kube/config

View File

@ -30,9 +30,9 @@
echo "get item"
bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
loop:
- { id: "iac.ansible.dockersecrets", dest: "/tmp/monitoring/uptime-kuma/files/docker-secrets.yaml" }
- { id: "iac.ansible.uptimekuma.mariadbsecret", dest: "/tmp/monitoring/uptime-kuma/files/uptime-kuma-secret.yaml" }
- { id: "iac.ansible.uptimekuma.monitorssecret", dest: "/tmp/monitoring/uptime-kuma/files/uptime-kuma-monitors-secret.yaml" }
- { id: "iac.ansible.dockersecrets", dest: "/tmp/monitoring/uptime-kuma/kubernetes-files/files/docker-secrets.yaml" }
- { id: "iac.ansible.uptimekuma.mariadbsecret", dest: "/tmp/monitoring/uptime-kuma/kubernetes-files/files/uptime-kuma-secret.yaml" }
- { id: "iac.ansible.uptimekuma.monitorssecret", dest: "/tmp/monitoring/uptime-kuma/kubernetes-files/files/uptime-kuma-monitors-secret.yaml" }
args:
executable: /bin/bash
environment: