Changed repository pull to warning if not successfull due to github.com down

This commit is contained in:
Kevin Veen-Birkenbach 2023-05-28 23:08:38 +02:00
parent 25e3d3c31c
commit 7ac8a7b54e
9 changed files with 64 additions and 1 deletions

View File

@ -3,4 +3,11 @@
repo: "{{ssh_configuration_repository}}" repo: "{{ssh_configuration_repository}}"
dest: "$HOME/.ssh" dest: "$HOME/.ssh"
update: yes update: yes
register: git_result
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

View File

@ -19,8 +19,15 @@
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
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}}"

View File

@ -3,8 +3,15 @@
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
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

View File

@ -25,6 +25,13 @@
update: yes update: yes
notify: setup akaunting notify: setup akaunting
become: true 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 akaunting version - name: set akaunting version
ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{akaunting_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{akaunting_version}}/' {} + ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{akaunting_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{akaunting_version}}/' {} +

View File

@ -14,6 +14,13 @@
recursive: yes recursive: yes
version: main version: main
notify: setup bigbluebutton 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 - name: deploy .env
template: src=env.j2 dest={{docker_compose_bigbluebutton_path}}/.env template: src=env.j2 dest={{docker_compose_bigbluebutton_path}}/.env

View File

@ -30,6 +30,13 @@
dest: "{{docker_elk_compose_path}}" dest: "{{docker_elk_compose_path}}"
update: yes update: yes
notify: recreate server_docker-elk notify: recreate server_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 - 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

View File

@ -19,6 +19,13 @@
update: yes update: yes
notify: recreate and build roulette-wheel notify: recreate and build roulette-wheel
become: true 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 - name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml

View File

@ -7,6 +7,13 @@
repo: "https://github.com/kevinveenbirkenbach/docker-volume-backup.git" repo: "https://github.com/kevinveenbirkenbach/docker-volume-backup.git"
dest: "{{docker_volume_backup_folder}}" dest: "{{docker_volume_backup_folder}}"
update: yes update: yes
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: configure docker-volume-backup.service - name: configure docker-volume-backup.service
template: template:

View File

@ -10,3 +10,10 @@
repo: "{{homepage_repository_address}}" repo: "{{homepage_repository_address}}"
dest: "/usr/share/nginx/homepage" dest: "/usr/share/nginx/homepage"
update: yes update: yes
register: git_result
ignore_errors: true
- name: Warn if repo is not reachable
debug:
msg: "Warning: Repository is not reachable."
when: git_result.failed