Some minor fixes
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Nikolai Rodionov 2024-05-08 10:33:37 +02:00
parent fbee6d9eb4
commit 50654bb0f6
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 12 additions and 3 deletions

View File

@ -19,13 +19,23 @@
community.sops.load_vars:
file: ../../../group_vars/cloudflare.sops.yaml
- name: Set IP
when: state == "present"
set_fact:
public_ip: "{{( lookup('file', '/tmp/outputs/provider_outputs.yaml')| from_yaml).user_entrypoint }}"
- name: Dummy public ip
when: state == "absent"
set_fact:
public_ip: 0.0.0.0
- name: Configre A record
community.general.cloudflare_dns:
api_token: "{{ api_token }}"
record: "{{ env }}"
zone: "badhouseplants.net"
type: A
value: "{{( lookup('file', '/tmp/outputs/provider_outputs.yaml')| from_yaml).user_entrypoint }}"
value: "{{ public_ip }}"
state: "{{ state }}"
- name: Configre CNAME

View File

@ -6,7 +6,6 @@
output_path: /tmp/outputs
tasks:
- name: Storing config on the local machine
when: download_config
ansible.builtin.fetch:
src: "/home/admin/.kube/config"
dest: "{{ output_path }}/config"

View File

@ -8,7 +8,7 @@
state: "{{ lookup('ansible.builtin.env', 'SP_STATE') }}"
server_type: "{{ lookup('ansible.builtin.env', 'SP_SERVER_TYPE', default='cx21') }}"
server_location: "{{ lookup('ansible.builtin.env', 'SP_SERVER_LOCATION', default='hel1') }}"
disk_size: "{{ lookup('ansible.builtin.env', 'SP_DISK_SIZE', default='40') }}"
disk_size: "{{ lookup('ansible.builtin.env', 'SP_DISK_SIZE', default='10') }}"
tags:
- cloud
tasks: