1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_weechat.git synced 2024-08-16 13:09:48 +02:00

improve custom git repo cloning

This commit is contained in:
L3D 2020-03-14 16:24:59 +01:00
parent a10901ddc9
commit 5779de42cf
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 22 additions and 7 deletions

View file

@ -33,12 +33,27 @@
- weechat.custom_config.gen_ssh_key_pair | bool
- ssh_key_pair.changed
- name: clone private git repository
- name: clone or update private git repository
become_user: "{{ weechat.user }}"
become: true
git:
repo: "{{ weechat.custom_config.private_repo }}"
dest: "{{ weechat.home_directory }}/.weechat"
version: master
accept_hostkey: yes
block:
- name: try to download/update git repo
git:
repo: "{{ weechat.custom_config.private_repo }}"
dest: "{{ weechat.home_directory }}/.weechat"
version: master
accept_hostkey: yes
update: yes
rescue:
- name: wait until you fixed remote git issues
pause:
prompt: "Please fix the issue with your git repository and try again"
- name: try to download/update git repo again
git:
repo: "{{ weechat.custom_config.private_repo }}"
dest: "{{ weechat.home_directory }}/.weechat"
version: master
accept_hostkey: yes
update: yes
when: not weechat.custom_config.private_repo | bool

View file

@ -9,7 +9,7 @@ weechat_plugin_languages:
lua: lua
# version management
playbook_version_number: 4096 # should be over ninethousand
playbook_version_number: 4097 # should be over ninethousand
playbook_version_path: 'role-weechat_roles-ansible_github.com.version'
# default values