From b55771db6062b9a86ed5158dcb389b51831c7fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claes=20Hallstr=C3=B6m?= Date: Sun, 13 Aug 2023 20:35:56 +0200 Subject: [PATCH] Add dummy vault file for ci No more need to send extra-vars. --- .github/actions/setup-ansible/action.yaml | 20 +++++++++++++++++++- .github/workflows/autorestic.yaml | 7 +------ .github/workflows/diun.yaml | 3 +-- .github/workflows/dozzle.yaml | 3 +-- .github/workflows/duckdns.yaml | 3 +-- .github/workflows/gatus.yaml | 3 +-- .github/workflows/healthchecks.yaml | 3 +-- .github/workflows/homeassistant.yaml | 6 +----- .github/workflows/homepage.yaml | 3 +-- .github/workflows/monocker.yaml | 3 +-- .github/workflows/speedtest.yaml | 3 +-- .github/workflows/traefik.yaml | 5 +---- .github/workflows/zigbee2mqtt.yaml | 6 +----- 13 files changed, 31 insertions(+), 37 deletions(-) diff --git a/.github/actions/setup-ansible/action.yaml b/.github/actions/setup-ansible/action.yaml index 2c4e779c..f230fcf0 100644 --- a/.github/actions/setup-ansible/action.yaml +++ b/.github/actions/setup-ansible/action.yaml @@ -14,5 +14,23 @@ runs: pip install ansible ansible-galaxy install --role-file requirements.yaml - sed -i '/vars_files/I,+1 d' main.yaml + echo "--- + b2_account_id: ci + b2_account_key: ci + backblaze_homeassistant_key: ci + backblaze_zigbee2mqtt_key: ci + domain: ci + duckdns_domain: ci + duckdns_token: ci + healthchecks_backup_homeassistant_ping_url: ci + healthchecks_backup_zigbee2mqtt_ping_url: ci + healthchecks_secret_key: ci + letsencrypt_email: ci + letsencrypt_provider: ci + mqtt_server: ci + telegram_chatids: ci + telegram_token: ci + traefik_password: ci + traefik_username: ci + " > vars/vault.yaml sed -i '/vault_password_file/d' ansible.cfg diff --git a/.github/workflows/autorestic.yaml b/.github/workflows/autorestic.yaml index 9919b6f2..ef23c1fc 100644 --- a/.github/workflows/autorestic.yaml +++ b/.github/workflows/autorestic.yaml @@ -20,11 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags autorestic \ - --extra-vars "b2_account_id=ci b2_account_key=ci \ - backblaze_homeassistant_key=ci \ - backblaze_zigbee2mqtt_key=ci \ - healthchecks_backup_homeassistant_ping_url=ci \ - healthchecks_backup_zigbee2mqtt_ping_url=ci" + ansible-playbook main.yaml --limit localhost --tags autorestic cd ~/autorestic && docker compose run autorestic diff --git a/.github/workflows/diun.yaml b/.github/workflows/diun.yaml index f001c480..57395ebb 100644 --- a/.github/workflows/diun.yaml +++ b/.github/workflows/diun.yaml @@ -20,7 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags diun \ - --extra-vars "telegram_token=ci telegram_chatids=ci" + ansible-playbook main.yaml --limit localhost --tags diun docker ps --filter name=diun | grep --quiet diun diff --git a/.github/workflows/dozzle.yaml b/.github/workflows/dozzle.yaml index a8f65f1f..51c4e6c3 100644 --- a/.github/workflows/dozzle.yaml +++ b/.github/workflows/dozzle.yaml @@ -22,7 +22,6 @@ jobs: - run: | docker network create --driver bridge proxy - ansible-playbook main.yaml --limit localhost --tags dozzle \ - --extra-vars "domain=ci" + ansible-playbook main.yaml --limit localhost --tags dozzle docker ps --filter name=dozzle | grep --quiet dozzle diff --git a/.github/workflows/duckdns.yaml b/.github/workflows/duckdns.yaml index f2ce0ad1..a94a269f 100644 --- a/.github/workflows/duckdns.yaml +++ b/.github/workflows/duckdns.yaml @@ -20,7 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags duckdns \ - --extra-vars "duckdns_domain=ci duckdns_token=ci" + ansible-playbook main.yaml --limit localhost --tags duckdns docker ps --filter name=duckdns | grep --quiet duckdns diff --git a/.github/workflows/gatus.yaml b/.github/workflows/gatus.yaml index 0f2580be..bf9971b7 100644 --- a/.github/workflows/gatus.yaml +++ b/.github/workflows/gatus.yaml @@ -20,7 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags gatus \ - --extra-vars "telegram_token=ci telegram_chatids=ci" + ansible-playbook main.yaml --limit localhost --tags gatus docker ps --filter name=gatus | grep --quiet gatus diff --git a/.github/workflows/healthchecks.yaml b/.github/workflows/healthchecks.yaml index 32be666c..8ca4379b 100644 --- a/.github/workflows/healthchecks.yaml +++ b/.github/workflows/healthchecks.yaml @@ -20,7 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags healthchecks \ - --extra-vars "healthchecks_secret_key=ci" + ansible-playbook main.yaml --limit localhost --tags healthchecks docker ps --filter name=healthchecks | grep --quiet healthchecks diff --git a/.github/workflows/homeassistant.yaml b/.github/workflows/homeassistant.yaml index ff7860d9..3916ca8b 100644 --- a/.github/workflows/homeassistant.yaml +++ b/.github/workflows/homeassistant.yaml @@ -20,11 +20,7 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags homeassistant \ - --extra-vars "domain=ci b2_account_id=ci b2_account_key=ci \ - backblaze_homeassistant_key=ci backblaze_zigbee2mqtt_key=ci \ - healthchecks_backup_homeassistant_url=ci \ - healthchecks_backup_zigbee2mqtt_url=ci" + ansible-playbook main.yaml --limit localhost --tags homeassistant docker ps --filter name=homeassistant | grep --quiet homeassistant docker exec homeassistant hass --config /config --script check_config diff --git a/.github/workflows/homepage.yaml b/.github/workflows/homepage.yaml index 8a302590..4d425537 100644 --- a/.github/workflows/homepage.yaml +++ b/.github/workflows/homepage.yaml @@ -22,7 +22,6 @@ jobs: - run: | docker network create --driver bridge proxy - ansible-playbook main.yaml --limit localhost --tags homepage \ - --extra-vars "domain=ci" + ansible-playbook main.yaml --limit localhost --tags homepage docker ps --filter name=homepage | grep --quiet homepage diff --git a/.github/workflows/monocker.yaml b/.github/workflows/monocker.yaml index 5a289397..ea277570 100644 --- a/.github/workflows/monocker.yaml +++ b/.github/workflows/monocker.yaml @@ -20,7 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags monocker \ - --extra-vars "telegram_token=ci telegram_chatids=ci" + ansible-playbook main.yaml --limit localhost --tags monocker docker ps --filter name=monocker | grep --quiet monocker diff --git a/.github/workflows/speedtest.yaml b/.github/workflows/speedtest.yaml index b1aa13f4..e8d5fdde 100644 --- a/.github/workflows/speedtest.yaml +++ b/.github/workflows/speedtest.yaml @@ -22,7 +22,6 @@ jobs: - run: | docker network create --driver bridge proxy - ansible-playbook main.yaml --limit localhost --tags speedtest \ - --extra-vars "domain=ci" + ansible-playbook main.yaml --limit localhost --tags speedtest docker ps --filter name=speedtest | grep --quiet speedtest diff --git a/.github/workflows/traefik.yaml b/.github/workflows/traefik.yaml index 29e86c49..90d58602 100644 --- a/.github/workflows/traefik.yaml +++ b/.github/workflows/traefik.yaml @@ -20,9 +20,6 @@ jobs: - uses: actions/checkout@v3.5.3 - uses: ./.github/actions/setup-ansible - run: | - ansible-playbook main.yaml --limit localhost --tags traefik \ - --extra-vars "domain=ci duckdns_token=ci \ - traefik_username=ci traefik_password=ci \ - letsencrypt_email=ci letsencrypt_provider=ci" + ansible-playbook main.yaml --limit localhost --tags traefik docker ps --filter name=traefik | grep --quiet traefik diff --git a/.github/workflows/zigbee2mqtt.yaml b/.github/workflows/zigbee2mqtt.yaml index bce57155..7cb0ed88 100644 --- a/.github/workflows/zigbee2mqtt.yaml +++ b/.github/workflows/zigbee2mqtt.yaml @@ -24,10 +24,6 @@ jobs: sed -i '/devices/I,+1 d' roles/zigbee2mqtt/files/compose.yaml sed -i '/platform/d' roles/zigbee2mqtt/files/compose.yaml - ansible-playbook main.yaml --limit localhost --tags zigbee2mqtt \ - --extra-vars "mqtt_server=ci b2_account_id=ci b2_account_key=ci \ - backblaze_homeassistant_key=ci backblaze_zigbee2mqtt_key=ci \ - healthchecks_backup_homeassistant_url=ci \ - healthchecks_backup_zigbee2mqtt_url=ci" + ansible-playbook main.yaml --limit localhost --tags zigbee2mqtt docker ps --filter name=zigbee2mqtt | grep --quiet zigbee2mqtt