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

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

View File

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