Author | SHA1 | Message | Date |
---|---|---|---|
Edoardo Putti | d5ed498aab | draft for phabricator configuration update | 8 years ago |
Edoardo Putti | 25b289a4e3 | playbook for phabricator | 8 years ago |
Edoardo Putti | aed9cc8865 | add template for phabricator site in nginx | 8 years ago |
Edoardo Putti | 7b3c965b96 | draft for phabricator role | 8 years ago |
@ -0,0 +1,10 @@ | |||||
--- | |||||
- hosts: biff | |||||
roles: | |||||
- role: lxc_guest | |||||
vm_name: phabricator | |||||
vm_size: 10G | |||||
- hosts: phabricator | |||||
roles: | |||||
- role: phabricator |
@ -0,0 +1,4 @@ | |||||
--- | |||||
- name: Update phabricator configuration | |||||
shell: rm /var/lib/phabricator/local.json || true; dpkg-reconfigure phabricator noninteractive | |||||
@ -0,0 +1,9 @@ | |||||
--- | |||||
dependencies: | |||||
- role: nginx | |||||
php: true | |||||
parent_role_path: "phabricator" | |||||
config_names: [ "phabricator" ] | |||||
verbosity: 2 | |||||
- role: mysql |
@ -0,0 +1,57 @@ | |||||
--- | |||||
- name: Generate admin password | |||||
gen_passwd: | |||||
length: 20 | |||||
register: new_passwd | |||||
#- name: Create phabricator DB | |||||
# mysql_db: | |||||
# name: phabricator_prod | |||||
# state: present | |||||
#- name: Set name for php-fpm socket | |||||
# template: | |||||
# | |||||
- name: Create phabricator user in mysql | |||||
mysql_user: | |||||
name: phabricator | |||||
password: "{{ new_passwd.passwd }}" | |||||
state: present | |||||
priv: "`phabricator\_%`.*:ALL" | |||||
- name: Configure phabricator | |||||
debconf: | |||||
name: 'phabricator' | |||||
question: '{{ item.key }}' | |||||
vtype: 'string' | |||||
value: '{{ item.value }}' | |||||
with_dict: | |||||
phabricator/phabricator_mysql_pwd: "{{ new_passwd.passwd }}" | |||||
phabricator/pwd_check: "{{ new_passwd.passwd }}" | |||||
phabricator/domain_name: "phabricator.lilik.it" | |||||
phabricator/phabricator_mysql_user: "phabricator" | |||||
phabricator/password_mismatch: "" | |||||
phabricator/webserver: "nginx" | |||||
phabricator/mysql_host: "localhost" | |||||
# notify: Update phabricator configuration | |||||
#- meta: flush_handlers | |||||
- name: Install apt-utils to configure phabricator | |||||
apt: | |||||
name: apt-utils | |||||
state: present | |||||
- name: Install phabricator and associated packages | |||||
apt: | |||||
name: "{{ item }}" | |||||
state: present | |||||
install_recommends: no | |||||
update_cache: yes | |||||
cache_valid_time: 3600 | |||||
with_items: | |||||
- php-mbstring | |||||
- phabricator | |||||
# - php-apcu | |||||
# - php-gd |
@ -0,0 +1,39 @@ | |||||
server { | |||||
listen 80; | |||||
client_max_body_size 4M; | |||||
client_body_buffer_size 128k; | |||||
server_name phabricator.lilik.it; | |||||
root /usr/share/phabricator; | |||||
index index.php; | |||||
location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } | |||||
location / { try_files $uri $uri @phabricator; } | |||||
location @phabricator { | |||||
index index.php; | |||||
rewrite ^/(.*)$ /index.php?__path__=/$1 last; | |||||
} | |||||
location /index.php { | |||||
fastcgi_index index.php; | |||||
fastcgi_param REDIRECT_STATUS 200; | |||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||||
fastcgi_param QUERY_STRING $query_string; | |||||
fastcgi_param REQUEST_METHOD $request_method; | |||||
fastcgi_param CONTENT_TYPE $content_type; | |||||
fastcgi_param CONTENT_LENGTH $content_length; | |||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1; | |||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; | |||||
fastcgi_param REMOTE_ADDR $remote_addr; | |||||
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |||||
} | |||||
} |