This commit is contained in:
Tomás Limpinho
2025-11-09 14:12:56 +00:00
4 changed files with 106 additions and 7 deletions

View File

@ -11,4 +11,4 @@ spec:
component: stolon-proxy
stolon-cluster: kube-stolon
type: LoadBalancer
loadBalancerIP: 192.168.1.105
#loadBalancerIP: 192.168.1.105

View File

@ -24,7 +24,9 @@
- name: Obter várias notas do Bitwarden
shell: |
BW_SESSION=(bw unlock {{ bw_password }} --raw)
echo "unlock"
BW_SESSION=$(bw unlock {{ bw_password }} --raw)
echo "get item"
bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
loop:
- { id: "iac.ansible.dockersecrets", dest: "/tmp/stolon/kubernetes-files/files/docker-secrets.yaml" }
@ -47,4 +49,22 @@
kubectl apply -f /tmp/stolon/kubernetes-files/files/stolon-namespace.yaml
kubectl apply -f /tmp/stolon/kubernetes-files/files/
environment:
KUBECONFIG: /home/fenix/.kube/config
KUBECONFIG: /home/fenix/.kube/config
- name: Verificar se o cluster Stolon já existe
shell: kubectl get configmap -n postgresql kube-stolon
register: stolon_cluster_check
failed_when: false
changed_when: false
become_user: fenix
environment:
KUBECONFIG: /home/fenix/.kube/config
#- name: Aplicar o stolon
# become: yes
# become_user: fenix
# shell: |
# kubectl run -i -n=postgresql -t stolonctl --image=sorintlab/stolon:master-pg10 --restart=Never --rm -- /usr/local/bin/stolonctl --cluster-name=kube-stolon --store-backend=kubernetes --kube-resource-kind=configmap init
# when: stolon_cluster_check.rc != 0
# environment:
# KUBECONFIG: /home/fenix/.kube/config