1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-05 21:06:02 +02:00
infrastructure/roles/fluxbb/tasks/main.yml
Kristian Klausen 4112bdf9fd Make ansible-lint happy
yaml: truthy value should be one of [false, true] (truthy)
yaml: wrong indentation: expected 4 but found 2 (indentation)
yaml: too few spaces before comment (comments)
yaml: missing starting space in comment (comments)
yaml: too many blank lines (1 > 0) (empty-lines)
yaml: too many spaces after colon (colons)
yaml: comment not indented like content (comments-indentation)
yaml: no new line character at the end of file (new-line-at-end-of-file)
load-failure: Failed to load or parse file
parser-error: couldn't resolve module/action 'hosts'. This often indicates a misspelling, missing collection, or incorrect module path.
2021-02-14 14:22:05 +01:00

63 lines
1.7 KiB
YAML

---
- name: create user
user: >
name=fluxbb home="{{ fluxbb_dir }}"
shell=/bin/false system=yes createhome=no
- name: clone fluxbb
git:
repo: https://git.archlinux.org/vhosts/bbs.archlinux.org.git/
dest: "{{ fluxbb_dir }}"
version: "{{ fluxbb_version }}"
- name: fix home permissions
file: state=directory owner=fluxbb group=fluxbb mode=0750 recurse=yes path="{{ fluxbb_dir }}"
changed_when: false
- name: create uploads directory
file: state=directory owner=fluxbb group=fluxbb mode=0755 path="{{ fluxbb_dir }}/uploads"
- name: create mariadb database
mysql_db: name=fluxbb state=present
- name: create mariadb user
mysql_user: >
user=fluxbb host=localhost password={{ fluxbb_db_password }}
priv='fluxbb.*:ALL'
- name: create nginx log directory
file: path=/var/log/nginx/{{ fluxbb_domain }} state=directory owner=root group=root mode=0755
- name: configure nginx
template: >
src=nginx.conf.j2 dest=/etc/nginx/nginx.d/fluxbb.conf
owner=root group=root mode=0644
notify: reload nginx
- name: install python-passlib
pacman: name=python-passlib
- name: create auth file
htpasswd: >
path=/etc/nginx/auth/fluxx
name={{ fluxbb_htpasswd.username }}
password={{ fluxbb_htpasswd.password }}
owner=root group=http mode=0640
- name: install forum config
template: >
src=config.php.j2 dest={{ fluxbb_dir }}/config.php
owner=fluxbb group=fluxbb mode=400
- name: install php-apcu
pacman: name=php-apcu,php-apcu-bc,php-intl
- name: configure php-fpm
template: >
src=php-fpm.conf.j2 dest=/etc/php/php-fpm.d/fluxbb.conf
owner=root group=root mode=0644
notify: restart php-fpm@fluxbb
- name: start and enable systemd socket
service: name=php-fpm@fluxbb.socket state=started enabled=true