2018-12-21 13:23:17 +00:00
|
|
|
# This play deploys the www code
|
|
|
|
# Example git checkout from Ansible Playbooks
|
|
|
|
- git:
|
2018-12-24 19:43:19 +00:00
|
|
|
repo: 'https://tildegit.org/thunix/www.git'
|
2018-12-21 13:23:17 +00:00
|
|
|
dest: /var/www/thunix.cf
|
2019-02-15 23:15:23 +00:00
|
|
|
force: yes
|
2019-02-18 01:41:23 +00:00
|
|
|
|
|
|
|
- git:
|
|
|
|
repo: 'https://tildegit.org/thunix/thunix_gopher.git'
|
|
|
|
dest: /var/gopher
|
|
|
|
force: yes
|
2019-03-16 21:50:20 +00:00
|
|
|
|
|
|
|
- file:
|
2019-03-16 22:06:08 +00:00
|
|
|
path: /var/www/autoconfig/mail
|
2019-03-16 21:50:20 +00:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: root
|
2019-03-16 22:06:08 +00:00
|
|
|
recurse: yes
|
2019-03-16 21:50:20 +00:00
|
|
|
|
|
|
|
- copy:
|
|
|
|
src: ../files/autoconfig.xml
|
2019-03-16 22:06:08 +00:00
|
|
|
dest: /var/www/autoconfig/mail/config-v1.1.xml
|
2019-03-16 21:50:20 +00:00
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: root
|
2019-03-21 14:00:01 +00:00
|
|
|
|
|
|
|
- name: Add githook local script
|
|
|
|
copy:
|
|
|
|
src: ../files/www-run
|
|
|
|
dest: /usr/local/bin/www-run
|
|
|
|
owner: root
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: Add githook systemd path unit
|
|
|
|
copy:
|
|
|
|
src: ../files/www-run.path
|
|
|
|
dest: /etc/systemd/system/www-run.path
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: Add githook system service unit
|
|
|
|
copy:
|
|
|
|
src: ../files/www-run.service
|
|
|
|
dest: /etc/systemd/system/www-run.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: Enabling ansible-pull units
|
|
|
|
systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
with_items:
|
|
|
|
- 'www-run.path'
|
|
|
|
- 'www-run.service'
|