2016-03-05 21:46:54 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: SET_FACT | FreeBSD web user
|
|
|
|
set_fact:
|
2018-03-17 03:56:15 +07:00
|
|
|
nginx_pkgng_package: 'nginx-full'
|
2016-03-05 21:46:54 +07:00
|
|
|
nginx_user: 'www'
|
2017-10-26 15:59:24 +07:00
|
|
|
nginx_php:
|
2019-12-30 00:18:24 +07:00
|
|
|
- upstream_name: 'manual'
|
2017-10-26 15:59:24 +07:00
|
|
|
sockets:
|
|
|
|
- host: '127.0.0.1'
|
|
|
|
port: 9000
|
2019-12-30 00:18:24 +07:00
|
|
|
- upstream_name: 'hx_unix'
|
|
|
|
sockets:
|
|
|
|
- host: '127.0.0.1'
|
|
|
|
port: 9000
|
|
|
|
- upstream_name: 'hx_ip'
|
|
|
|
sockets:
|
|
|
|
- host: '127.0.0.1'
|
|
|
|
port: 9000
|
2018-03-17 03:56:15 +07:00
|
|
|
ngrok_path: '/usr/local/bin/ngrok'
|
2016-03-05 23:26:05 +07:00
|
|
|
|
|
|
|
- name: PKGNG | Install needed packages
|
2017-10-03 22:57:35 +07:00
|
|
|
pkgng:
|
2019-01-24 17:05:46 +07:00
|
|
|
pkg: "{{ packages }}"
|
2017-10-03 22:57:35 +07:00
|
|
|
state: present
|
2019-01-24 17:05:46 +07:00
|
|
|
vars:
|
|
|
|
packages:
|
2021-09-01 16:45:44 +07:00
|
|
|
- bash
|
2019-01-24 17:05:46 +07:00
|
|
|
- curl
|
|
|
|
- daemonize
|
|
|
|
- fcgiwrap
|
|
|
|
- jq
|
|
|
|
- nghttp2
|
2019-12-30 00:18:24 +07:00
|
|
|
- php74
|
2019-01-24 17:05:46 +07:00
|
|
|
- vim
|
2018-03-17 03:56:15 +07:00
|
|
|
|
2016-03-05 23:26:05 +07:00
|
|
|
- name: SERVICE | Force start services
|
2017-10-03 22:57:35 +07:00
|
|
|
service:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: started
|
2021-09-01 16:21:12 +07:00
|
|
|
enabled: true
|
2016-03-05 23:26:05 +07:00
|
|
|
register: sf
|
2019-01-24 17:05:46 +07:00
|
|
|
loop:
|
2016-03-05 23:26:05 +07:00
|
|
|
- php-fpm
|
2018-03-17 03:56:15 +07:00
|
|
|
|
|
|
|
- name: STAT | Check ports
|
|
|
|
stat:
|
|
|
|
path: /usr/ports
|
|
|
|
register: ports
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: COMMAND | Get ports
|
|
|
|
command: portsnap fetch --interactive
|
|
|
|
|
|
|
|
- name: COMMAND | Extract ports
|
|
|
|
command: portsnap extract
|
|
|
|
no_log: true
|
|
|
|
|
|
|
|
when: not ports.stat.exists
|
|
|
|
|
|
|
|
- name: SHELL | Install ngrok
|
|
|
|
shell: make install clean DISABLE_LICENSES=yes
|
|
|
|
args:
|
|
|
|
chdir: /usr/ports/security/ngrok
|
|
|
|
creates: "{{ ngrok_path }}"
|