mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-24 21:51:03 +01:00
Solved bugs and removed debug messages if repository is not reachable
This commit is contained in:
parent
5ad6bf7e34
commit
d24b0dc839
@ -11,15 +11,9 @@
|
||||
repo: "https://github.com/kevinveenbirkenbach/backup-docker-to-local.git"
|
||||
dest: "{{backup_docker_to_local_folder}}"
|
||||
update: yes
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
when: run_once_backup_docker_to_local is not defined
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result is defined and git_result.failed is defined and run_once_cleanup_failed_docker_backups is not defined
|
||||
|
||||
- name: configure backup-docker-to-local-everything.service
|
||||
template:
|
||||
src: backup-docker-to-local-everything.service.j2
|
||||
|
@ -3,15 +3,9 @@
|
||||
repo: "https://github.com/kevinveenbirkenbach/cleanup-failed-docker-backups.git"
|
||||
dest: "{{backup_docker_to_local_cleanup_folder}}"
|
||||
update: yes
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
when: run_once_cleanup_failed_docker_backups is not defined
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result is defined and git_result.failed is defined and run_once_cleanup_failed_docker_backups is not defined
|
||||
|
||||
- name: configure cleanup-failed-docker-backups.service
|
||||
template:
|
||||
src: cleanup-failed-docker-backups.service.j2
|
||||
|
@ -29,14 +29,8 @@
|
||||
recursive: yes
|
||||
version: main
|
||||
notify: setup bigbluebutton
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: deploy .env
|
||||
template: src=env.j2 dest={{docker_compose_instance_directory}}/.env
|
||||
notify: setup bigbluebutton
|
||||
|
@ -14,17 +14,12 @@
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- 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:
|
||||
@ -33,14 +28,8 @@
|
||||
update: yes
|
||||
notify: recreate discourse
|
||||
become: true
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: set chmod 700 for {{docker_compose_instance_directory}}containers
|
||||
ansible.builtin.file:
|
||||
path: "{{docker_compose_instance_directory}}/containers"
|
||||
|
@ -1,4 +1,4 @@
|
||||
docker_compose_project_name: "attendize"
|
||||
docker_compose_project_name: "discourse"
|
||||
database_password: "{{ baserow_database_password }}"
|
||||
database_version: "{{ baserow_database_version | default(postgres_default_version) }}"
|
||||
database_type: "postgres"
|
@ -26,14 +26,8 @@
|
||||
dest: "{{docker_elk_compose_path}}"
|
||||
update: yes
|
||||
notify: recreate docker-elk
|
||||
register: git_result
|
||||
ignore_errors: 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 dest={{docker_elk_compose_path}}docker-compose.yml
|
||||
notify: recreate docker-elk
|
||||
|
@ -15,14 +15,8 @@
|
||||
update: yes
|
||||
notify: docker compose project setup
|
||||
become: true
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
||||
|
@ -19,15 +19,9 @@
|
||||
repo: "git@github.com:kevinveenbirkenbach/cli-gnome-extension-manager.git"
|
||||
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/cli-gnome-extension-manager"
|
||||
update: yes
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
become: false
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: Execute CLI GNOME Extension manager script
|
||||
ansible.builtin.shell: bash "/home/{{client_username}}/Repositories/github.com/kevinveenbirkenbach/cli-gnome-extension-manager/gnome-extension-manager.sh" "{{ item[0] }}" "{{ item[1] }}" "{{ item[2] }}"
|
||||
loop: "{{gnome_extensions}}"
|
||||
|
@ -3,15 +3,9 @@
|
||||
repo: "https://github.com/kevinveenbirkenbach/create-linux-swapfile.git"
|
||||
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/create-linux-swapfile"
|
||||
update: yes
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
become: false
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: Execute create swapfile script
|
||||
ansible.builtin.shell: bash "/home/{{client_username}}/Repositories/github.com/kevinveenbirkenbach/create-linux-swapfile/create-linux-swapfile.sh" "{{swapfile_size}}"
|
||||
become: true
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user