forked from thunix/ansible
97 lines
2.0 KiB
YAML
97 lines
2.0 KiB
YAML
# This play deploys the www code
|
|
# Example git checkout from Ansible Playbooks
|
|
- git:
|
|
repo: 'https://tildegit.org/thunix/www.git'
|
|
dest: /var/www/thunix.cf
|
|
force: yes
|
|
|
|
- git:
|
|
repo: 'https://tildegit.org/thunix/thunix_gopher.git'
|
|
dest: /var/gopher
|
|
force: yes
|
|
|
|
- git:
|
|
repo: 'https://tildegit.org/thunix/wiki.git'
|
|
dest: /var/www/wiki.thunix.net
|
|
force: yes
|
|
|
|
- file:
|
|
path: /var/www/autoconfig/mail
|
|
state: directory
|
|
mode: 0755
|
|
owner: root
|
|
group: root
|
|
recurse: yes
|
|
|
|
- copy:
|
|
src: ../files/autoconfig.xml
|
|
dest: /var/www/autoconfig/mail/config-v1.1.xml
|
|
mode: 0755
|
|
owner: root
|
|
group: root
|
|
|
|
- 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: Add githook for wiki local script
|
|
copy:
|
|
src: ../files/wiki-run
|
|
dest: /usr/local/bin/wiki-run
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: Add wiki githook system path unit
|
|
copy:
|
|
src: ../files/wiki-run.path
|
|
dest: /etc/systemd/system/wiki-run.path
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Add wiki githook service unit
|
|
copy:
|
|
src: ../files/wiki-run.service
|
|
dest: /etc/systemd/system/wiki-run.service
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Enable php for userdirs
|
|
copy:
|
|
src: ../files/etc/apache2/mods-available/php7.3.conf
|
|
dest: /etc/apache2/mods-available/php7.3.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Enabling ansible-pull units
|
|
systemd:
|
|
name: "{{ item }}"
|
|
enabled: yes
|
|
with_items:
|
|
- 'www-run.path'
|
|
- 'www-run.service'
|
|
- 'wiki-run.path'
|
|
- 'wiki-run.service'
|