You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install auto update script for {{ repo_name }}
|
|
|
|
template:
|
|
|
|
src: "update.sh"
|
|
|
|
dest: "{{ update_script_path }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "u=rwx,g=rx,o=r"
|
|
|
|
|
|
|
|
- name: Create repository directory for {{ repo_name }}
|
|
|
|
file:
|
|
|
|
path: "{{ dest }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ owner }}"
|
|
|
|
group: "{{ group }}"
|
|
|
|
mode: "{{ mode }}"
|
|
|
|
|
|
|
|
- name: Clone repository to {{ dest }}
|
|
|
|
command: "{{ update_script_path }}"
|
|
|
|
args:
|
|
|
|
creates: "{{ dest }}/.git"
|
|
|
|
register: update_result
|
|
|
|
failed_when: update_result.rc not in [0, 2]
|
|
|
|
|
|
|
|
- name: Enable auto update of {{ repo_name }}
|
|
|
|
cron:
|
|
|
|
hour: 2
|
|
|
|
minute: 0
|
|
|
|
job: "{{ update_script_path }}"
|
|
|
|
name: "{{ cron_name }}"
|
|
|
|
state: present
|