summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Flink <tflink@fedoraproject.org>2015-02-02 06:50:15 +0000
committerTim Flink <tflink@fedoraproject.org>2015-02-02 06:50:15 +0000
commit401c8621b4f4be099b7554e9f2620f8ae18b6435 (patch)
tree3cb1a4403a56d18090356e0624382049e8642712
parentc4d9164aff4a5715c951263082e1c3bcbfc198ca (diff)
downloadansible-401c8621b4f4be099b7554e9f2620f8ae18b6435.tar.gz
ansible-401c8621b4f4be099b7554e9f2620f8ae18b6435.tar.xz
ansible-401c8621b4f4be099b7554e9f2620f8ae18b6435.zip
migrating phab file-based config to new json-based method
-rw-r--r--roles/phabricator/tasks/main.yml3
-rw-r--r--roles/phabricator/templates/local.json.j229
-rw-r--r--roles/phabricator/templates/qadevelconfig.conf.php.j229
3 files changed, 28 insertions, 33 deletions
diff --git a/roles/phabricator/tasks/main.yml b/roles/phabricator/tasks/main.yml
index ae2be1a8f..c1e030574 100644
--- a/roles/phabricator/tasks/main.yml
+++ b/roles/phabricator/tasks/main.yml
@@ -52,9 +52,6 @@
- name: create log directory for phabricator
file: path=/var/log/phabricator state=directory owner={{ phabricator_daemon_user }} group=apache mode=1775
-- name: generate phabricator config
- template: src={{ phabricator_config_filename }}.conf.php.j2 dest={{ phabroot }}/phabricator/conf/{{ phabricator_config_filename }}.conf.php owner=apache group=apache mode=0644
-
- name: generate phabricator environment
template: src=ENVIRONMENT.j2 dest={{ phabroot }}/phabricator/conf/local/ENVIRONMENT owner=apache group=apache mode=0644
diff --git a/roles/phabricator/templates/local.json.j2 b/roles/phabricator/templates/local.json.j2
index c869ab1bf..755b7942a 100644
--- a/roles/phabricator/templates/local.json.j2
+++ b/roles/phabricator/templates/local.json.j2
@@ -1,5 +1,32 @@
{
+ "phabricator.base-uri" : "https:\/\/phab.{{ external_hostname }}\/",
+ "log.ssh.path" : "\/var\/log\/phabricator\/ssh.log"
+ "log.access.path" : "\/var\/log\/phabricator\/access.log"
+ "mysql.host" : "{{ mariadb_host }}",
+ "mysql.user" : "{{ mariadb_user }}",
+ "mysql.pass" : "{{ mariadb_password }}",
"load-libraries" : [],
- "phabricator.base-uri" : "https:\/\/phab.{{ external_hostname }}\/"
+ "log.access.path" : "/var/log/phabricator/access.log",
+ "log.ssh.path" : "/var/log/phabricator/ssh.log",
+ "phd.pid-directory" : "/var/run/phabricator/",
+ "phd.log-directory" : "/var/log/phabricator/",
+ "phd.user" : "{{ phabricator_daemon_user }}",
+ "environment.append-paths" : ["/usr/libexec/git-core/"],
+ "diffusion.ssh-user" : "{{ phabricator_vcs_user }}",
+ "welcome.html" : "{{ lookup("file", "phabricator-welcome.html") }}",
+ "ui.header-color" : "{{ phabricator_header_color }}",
+ "metamta.default-address" : "phab@{{ external_hostname }}",
+ "metamta.domain" : "{{ external_hostname }}",
+ "metamta.reply-handler-domain" : "{{ external_hostname }}",
+ "metamta.mail-adapter" : "{{ "PhabricatorMailImplementationPHPMailerLiteAdapter" if phabricator_mail_enabled else "PhabricatorMailImplementationTestAdapter"}}",
+ "phabricator.uninstalled-applications" : {
+ "PhabricatorApplicationPhame" : true,
+ "PhabricatorApplicationDiviner" : true,
+ "PhabricatorApplicationLegalpad" : true,
+ "PhabricatorApplicationDrydock" : true,
+ "PhabricatorApplicationHarbormaster" : true,
+ "PhabricatorApplicationOAuthServer" : true,
+ "PhabricatorApplicationPhortune" : true
+ }
}
diff --git a/roles/phabricator/templates/qadevelconfig.conf.php.j2 b/roles/phabricator/templates/qadevelconfig.conf.php.j2
deleted file mode 100644
index 2c977164d..000000000
--- a/roles/phabricator/templates/qadevelconfig.conf.php.j2
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-//'welcome.html' => '<h1>Fedora QA Devel Phabricator</h1><p>The Fedora QA Devel team uses this phabricator instance for tracking issues, code reviews and some documentation. <ul><li>lists</li><li><a href="http://roshi.fedorapeople.org/dexy/">Links to docs</a></li><li>...</li></ul></p>',
-return array(
- 'mysql.host' => '{{ mariadb_host }}',
- 'mysql.user' => '{{ mariadb_user }}',
- 'mysql.pass' => '{{ mariadb_password }}',
- 'log.access.path' => '/var/log/phabricator/access.log',
- 'log.ssh.path' => '/var/log/phabricator/ssh.log',
- 'phd.pid-directory' => '/var/run/phabricator/',
- 'phd.log-directory' => '/var/log/phabricator/',
- 'phd.user' => '{{ phabricator_daemon_user }}',
- 'environment.append-paths' => ['/usr/libexec/git-core/'],
- 'diffusion.ssh-user' => '{{ phabricator_vcs_user }}',
- 'welcome.html' => '{{ lookup("file", "phabricator-welcome.html") }}',
- 'ui.header-color' => '{{ phabricator_header_color }}',
- 'metamta.default-address' => 'phab@{{ external_hostname }}',
- 'metamta.domain' => '{{ external_hostname }}',
- 'metamta.reply-handler-domain' => '{{ external_hostname }}',
- 'metamta.mail-adapter' => '{{ 'PhabricatorMailImplementationPHPMailerLiteAdapter' if phabricator_mail_enabled else 'PhabricatorMailImplementationTestAdapter'}}',
- 'phabricator.uninstalled-applications' => array(
- 'PhabricatorApplicationPhame' => true,
- 'PhabricatorApplicationDiviner' => true,
- 'PhabricatorApplicationLegalpad' => true,
- 'PhabricatorApplicationDrydock' => true,
- 'PhabricatorApplicationHarbormaster' => true,
- 'PhabricatorApplicationOAuthServer' => true,
- 'PhabricatorApplicationPhortune' => true)
-);