Create file on successful sp setup to handle reruns

This commit is contained in:
Adw8 2024-10-01 16:51:00 +05:30
parent 18ec7d1121
commit 5b781ec336
2 changed files with 17 additions and 0 deletions

View File

@ -36,3 +36,8 @@
- name: Start the deployer ui - name: Start the deployer ui
command: laconic-so deployment --dir webapp-ui start command: laconic-so deployment --dir webapp-ui start
- name: Create .out file
file:
path: "{{ ansible_env.HOME }}/.out"
state: touch

View File

@ -1,3 +1,15 @@
- hosts: "{{ target_host }}"
tasks:
- name: Check if .out file exists
stat:
path: "{{ ansible_env.HOME }}/.out"
register: out_file
- name: Exit playbook if .out file exists
fail:
msg: ".out file exists, exiting playbook."
when: out_file.stat.exists
- import_playbook: setup-dns.yml - import_playbook: setup-dns.yml
- import_playbook: setup-system.yml - import_playbook: setup-system.yml
- import_playbook: setup-k8s.yml - import_playbook: setup-k8s.yml