mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
23 lines
599 B
YAML
23 lines
599 B
YAML
---
|
|
|
|
- name: "Validate Gitlab's configuration file"
|
|
become: true
|
|
ansible.builtin.command: gitlab-ctl show-config
|
|
register: config_file_validation
|
|
changed_when: false
|
|
failed_when: config_file_validation.rc != 0
|
|
|
|
- name: Reconfigure Gitlab
|
|
when: config_file_validation is not failed
|
|
become: true
|
|
ansible.builtin.command: gitlab-ctl reconfigure
|
|
register: reconfiguration
|
|
changed_when:
|
|
- reconfiguration.rc == 0
|
|
- >-
|
|
(
|
|
reconfiguration.stdout
|
|
| regex_findall('Infra Phase complete, .*')
|
|
) is not search('0/')
|
|
failed_when: reconfiguration.rc != 0
|