2022-08-18 18:12:59 +02:00
|
|
|
- name: pull swapfile creating script
|
|
|
|
git:
|
2023-05-28 22:17:33 +02:00
|
|
|
repo: "https://github.com/kevinveenbirkenbach/create-linux-swapfile.git"
|
2022-08-18 18:12:59 +02:00
|
|
|
dest: "$HOME/Repositories/github.com/kevinveenbirkenbach/create-linux-swapfile"
|
|
|
|
update: yes
|
2023-05-28 23:08:38 +02:00
|
|
|
register: git_result
|
|
|
|
ignore_errors: true
|
2022-08-18 18:12:59 +02:00
|
|
|
become: false
|
|
|
|
|
2023-05-28 23:08:38 +02:00
|
|
|
- name: Warn if repo is not reachable
|
|
|
|
debug:
|
|
|
|
msg: "Warning: Repository is not reachable."
|
|
|
|
when: git_result.failed
|
|
|
|
|
2022-08-18 18:12:59 +02:00
|
|
|
- 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
|