mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 04:31:13 +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"
|
repo: "https://github.com/kevinveenbirkenbach/backup-docker-to-local.git"
|
||||||
dest: "{{backup_docker_to_local_folder}}"
|
dest: "{{backup_docker_to_local_folder}}"
|
||||||
update: yes
|
update: yes
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: run_once_backup_docker_to_local is not defined
|
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
|
- name: configure backup-docker-to-local-everything.service
|
||||||
template:
|
template:
|
||||||
src: backup-docker-to-local-everything.service.j2
|
src: backup-docker-to-local-everything.service.j2
|
||||||
|
@ -3,15 +3,9 @@
|
|||||||
repo: "https://github.com/kevinveenbirkenbach/cleanup-failed-docker-backups.git"
|
repo: "https://github.com/kevinveenbirkenbach/cleanup-failed-docker-backups.git"
|
||||||
dest: "{{backup_docker_to_local_cleanup_folder}}"
|
dest: "{{backup_docker_to_local_cleanup_folder}}"
|
||||||
update: yes
|
update: yes
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: run_once_cleanup_failed_docker_backups is not defined
|
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
|
- name: configure cleanup-failed-docker-backups.service
|
||||||
template:
|
template:
|
||||||
src: cleanup-failed-docker-backups.service.j2
|
src: cleanup-failed-docker-backups.service.j2
|
||||||
|
@ -29,14 +29,8 @@
|
|||||||
recursive: yes
|
recursive: yes
|
||||||
version: main
|
version: main
|
||||||
notify: setup bigbluebutton
|
notify: setup bigbluebutton
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Warn if repo is not reachable
|
|
||||||
debug:
|
|
||||||
msg: "Warning: Repository is not reachable."
|
|
||||||
when: git_result.failed
|
|
||||||
|
|
||||||
- name: deploy .env
|
- name: deploy .env
|
||||||
template: src=env.j2 dest={{docker_compose_instance_directory}}/.env
|
template: src=env.j2 dest={{docker_compose_instance_directory}}/.env
|
||||||
notify: setup bigbluebutton
|
notify: setup bigbluebutton
|
||||||
|
@ -14,17 +14,12 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: register directory
|
|
||||||
stat:
|
|
||||||
path: "{{docker_compose_instance_directory}}"
|
|
||||||
register: docker_compose_instance_directory_register
|
|
||||||
|
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
ansible.builtin.shell: git checkout .
|
ansible.builtin.shell: git checkout .
|
||||||
become: true
|
become: true
|
||||||
args:
|
args:
|
||||||
chdir: "{{docker_compose_instance_directory}}"
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
when: docker_compose_instance_directory_register.stat.exists
|
ignore_errors: true
|
||||||
|
|
||||||
- name: pull docker repository
|
- name: pull docker repository
|
||||||
git:
|
git:
|
||||||
@ -33,14 +28,8 @@
|
|||||||
update: yes
|
update: yes
|
||||||
notify: recreate discourse
|
notify: recreate discourse
|
||||||
become: true
|
become: true
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
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
|
- name: set chmod 700 for {{docker_compose_instance_directory}}containers
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{docker_compose_instance_directory}}/containers"
|
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_password: "{{ baserow_database_password }}"
|
||||||
database_version: "{{ baserow_database_version | default(postgres_default_version) }}"
|
database_version: "{{ baserow_database_version | default(postgres_default_version) }}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
@ -26,14 +26,8 @@
|
|||||||
dest: "{{docker_elk_compose_path}}"
|
dest: "{{docker_elk_compose_path}}"
|
||||||
update: yes
|
update: yes
|
||||||
notify: recreate docker-elk
|
notify: recreate docker-elk
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
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
|
- name: copy docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_elk_compose_path}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_elk_compose_path}}docker-compose.yml
|
||||||
notify: recreate docker-elk
|
notify: recreate docker-elk
|
||||||
|
@ -15,14 +15,8 @@
|
|||||||
update: yes
|
update: yes
|
||||||
notify: docker compose project setup
|
notify: docker compose project setup
|
||||||
become: true
|
become: true
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
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
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: docker compose project setup
|
||||||
|
@ -19,15 +19,9 @@
|
|||||||
repo: "git@github.com:kevinveenbirkenbach/cli-gnome-extension-manager.git"
|
repo: "git@github.com:kevinveenbirkenbach/cli-gnome-extension-manager.git"
|
||||||
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/cli-gnome-extension-manager"
|
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/cli-gnome-extension-manager"
|
||||||
update: yes
|
update: yes
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
become: false
|
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
|
- 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] }}"
|
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}}"
|
loop: "{{gnome_extensions}}"
|
||||||
|
@ -3,15 +3,9 @@
|
|||||||
repo: "https://github.com/kevinveenbirkenbach/create-linux-swapfile.git"
|
repo: "https://github.com/kevinveenbirkenbach/create-linux-swapfile.git"
|
||||||
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/create-linux-swapfile"
|
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/create-linux-swapfile"
|
||||||
update: yes
|
update: yes
|
||||||
register: git_result
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
become: false
|
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
|
- 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}}"
|
ansible.builtin.shell: bash "/home/{{client_username}}/Repositories/github.com/kevinveenbirkenbach/create-linux-swapfile/create-linux-swapfile.sh" "{{swapfile_size}}"
|
||||||
become: true
|
become: true
|
@ -5,17 +5,12 @@
|
|||||||
removes: "{{ docker_compose_file_path }}"
|
removes: "{{ docker_compose_file_path }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: register directory
|
|
||||||
stat:
|
|
||||||
path: "{{docker_compose_instance_directory}}"
|
|
||||||
register: docker_compose_instance_directory_register
|
|
||||||
|
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
ansible.builtin.shell: git checkout .
|
ansible.builtin.shell: git checkout .
|
||||||
become: true
|
become: true
|
||||||
args:
|
args:
|
||||||
chdir: "{{docker_compose_instance_directory}}"
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
when: docker_compose_instance_directory_register.stat.exists
|
ignore_errors: true
|
||||||
|
|
||||||
- name: pull docker repository
|
- name: pull docker repository
|
||||||
git:
|
git:
|
||||||
@ -24,7 +19,6 @@
|
|||||||
update: yes
|
update: yes
|
||||||
notify: docker compose project setup
|
notify: docker compose project setup
|
||||||
become: true
|
become: true
|
||||||
register: git_result
|
|
||||||
|
|
||||||
- name: "restore docker-compose.yml from backup"
|
- name: "restore docker-compose.yml from backup"
|
||||||
command: >
|
command: >
|
||||||
@ -33,11 +27,6 @@
|
|||||||
removes: "{{ docker_compose_backup_path }}"
|
removes: "{{ docker_compose_backup_path }}"
|
||||||
become: true
|
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"
|
- name: "copy docker-compose.yml"
|
||||||
template:
|
template:
|
||||||
src: docker-compose.yml.j2
|
src: docker-compose.yml.j2
|
||||||
|
Loading…
Reference in New Issue
Block a user