homelab_flarum/roles/flarum/tasks/main.yml

49 lines
1008 B
YAML
Raw Normal View History

2024-03-05 08:32:15 -06:00
---
- name: Add flarum group
become: yes
group:
name: flarum
state: present
- name: Add flarum user
become: yes
user:
create_home: yes
name: flarum
comment: For running flarum
shell: /bin/false
password: '!'
home: /home/flarum
- name: Create Flarum install dir
become: yes
file:
path: /home/flarum/flarum
state: directory
owner: flarum
group: flarum
- name: Install PHP
become: yes
zypper:
name: php81
state: latest
- name: Install Composer
become: yes
script:
command: composer_installer.sh
creates: /usr/bin/composer
- name: Create Flarum project
become: yes
become_user: flarum
community.general.composer:
command: create-project
arguments: flarum/flarum .
working-dir: /home/flarum/flarum
- name: Setup Nginx
import_tasks: setup_nginx.yml
- name: Add to CloudflareD tunnel
import_tasks: add_to_cloudflare_tunnel.yml
- name: Reload Nginx
become: yes
systemd:
name: nginx
state: reloaded