mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Solved bugs and removed debug messages if repository is not reachable
This commit is contained in:
@@ -5,17 +5,12 @@
|
||||
removes: "{{ docker_compose_file_path }}"
|
||||
become: true
|
||||
|
||||
- name: register directory
|
||||
stat:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
register: docker_compose_instance_directory_register
|
||||
|
||||
- name: checkout repository
|
||||
ansible.builtin.shell: git checkout .
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
when: docker_compose_instance_directory_register.stat.exists
|
||||
ignore_errors: true
|
||||
|
||||
- name: pull docker repository
|
||||
git:
|
||||
@@ -24,7 +19,6 @@
|
||||
update: yes
|
||||
notify: docker compose project setup
|
||||
become: true
|
||||
register: git_result
|
||||
|
||||
- name: "restore docker-compose.yml from backup"
|
||||
command: >
|
||||
@@ -33,11 +27,6 @@
|
||||
removes: "{{ docker_compose_backup_path }}"
|
||||
become: true
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: "copy docker-compose.yml"
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
|
Reference in New Issue
Block a user