aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolan McMahon <caolan.mcmahon@gmail.com>2019-03-09 14:04:10 +0000
committerCaolan McMahon <caolan.mcmahon@gmail.com>2019-03-09 14:22:39 +0000
commit7e286a011606e78942d176ad7a3b3469f5b7cdca (patch)
treedcab4ee990b61ad52306745f31ab3575302c06a7
parent01106293e7ee23e01d9d7e134c10cfd2b0c6d169 (diff)
downloaddarkpeak-services-7e286a011606e78942d176ad7a3b3469f5b7cdca.tar.gz
darkpeak-services-7e286a011606e78942d176ad7a3b3469f5b7cdca.tar.xz
darkpeak-services-7e286a011606e78942d176ad7a3b3469f5b7cdca.zip
add template dev playbook
-rw-r--r--README.md15
-rw-r--r--dev-playbook-template.yml71
2 files changed, 75 insertions, 11 deletions
diff --git a/README.md b/README.md
index 0ad31b0..9eabdf6 100644
--- a/README.md
+++ b/README.md
@@ -30,20 +30,13 @@ Then run:
## Create Your Development Playbook
-Make a copy of the production playbook and edit it to include only those services on which you want to work:
+Make a copy of the template playbook and edit it to include only those services on which you want to work:
- cp prod-playbook.yml dev-playbook.yml
- sed -i '/mastodon/d' dev-playbook.yml # You're a damn time sink, mastodon
+ cp dev-playbook-template.yml dev-playbook.yml
-Then set the "development_mode" variable to "true" and the "domain_name" variable to the development domain "darkpeak.localhost" and you are ready to go.
+Make sure the "development_mode" variable is set to "true" and the "domain_name" variable is set to the development domain "darkpeak.localhost" and you are ready to go.
-You'll also need to replace the ansible-vault encrypted passwords with
-hard=coded development data. For example:
-
- ttrss_postgresql_password: "correcthorsebatterystaple"
- sabredav_mysql_password: "correcthorsebatterystaple"
- trac_postgresql_password: "correcthorsebatterystaple"
- mediawiki_admin_pass: "correcthorsebatterystaple"
+For some services you may also need to set "first_run" to "true", then immediately set it back to "false" after you've first provisioned the vm.
## Developing With Vagrant
diff --git a/dev-playbook-template.yml b/dev-playbook-template.yml
new file mode 100644
index 0000000..0f78a5f
--- /dev/null
+++ b/dev-playbook-template.yml
@@ -0,0 +1,71 @@
+---
+- hosts: all
+
+ roles:
+ - git
+ - ipsilon
+ - pleroma
+ - mediawiki
+ - pages
+ - sabredav
+ - trac
+ - ttrss
+ - znc
+
+ become: yes
+ become_user: root
+ become_method: sudo
+
+ pre_tasks:
+ - name: Verify Ansible version
+ assert:
+ that: "ansible_version.full is version_compare('2.4', '>=')"
+ msg: "You must update Ansible to at least 2.4 to use this playbook"
+
+ vars:
+ # Setting this will install self-signed TLS certificates for local testing
+ # with Vagrant
+ development_mode: true
+
+ # Setting this will initialise the TTRSS and SABREDAV databases, DESTROYING
+ # any existing data in the process!
+ first_run: true
+
+ domain_name: darkpeak.localhost
+ default_web_root: /var/www
+ php_fpm_config_path: /etc/php/7.0/fpm
+ php_session_path: /var/lib/php/sessions
+ postgresql_user: postgres
+ postgresql_group: postgres
+ postgresql_locales:
+ - en_GB.UTF-8
+ - en_US.UTF-8
+
+ ldap_auth_domain: "darkpeak.org"
+ # see: https://issues.darkpeak.org/ticket/2#comment:10
+ # ldap_server: "id.{{ ldap_auth_domain }}"
+ ldap_server: "213.138.110.5"
+ ldap_port: 389
+ ldap_port_ssl: 636
+ ldap_uri: "ldap://{{ ldap_server }}/"
+ ldap_uri_ssl: "ldaps://{{ ldap_server }}/"
+ ldap_basedn: "dc=darkpeak,dc=org"
+ ldap_user_basedn: "cn=users,cn=accounts,{{ ldap_basedn }}"
+ ldap_group_basedn: "cn=groups,cn=accounts,{{ ldap_basedn }}"
+
+ ttrss_postgresql_password: "correcthorsebatterystaple"
+ sabredav_mysql_password: "correcthorsebatterystaple"
+ trac_postgresql_password: "correcthorsebatterystaple"
+ mediawiki_admin_pass: "correcthorsebatterystaple"
+
+ # NOTE: when setting a plain text value for development, it must be at least 64 bytes long
+ # e.g. d58db5c0e6ff8833be6eaf4be708f557348c5bd3fa00d1a5ab5ad8984e157380 123
+ pleroma_secret_key_base: "d58db5c0e6ff8833be6eaf4be708f557348c5bd3fa00d1a5ab5ad8984e157380"
+
+ pleroma_postgresql_password: "correcthorsebatterystaple"
+
+ # For development you can use: "BE2DT5J3ajLCCeYhDIOltgD3XmVOFxd6DhXoo5eubtl654utL2fyLURKF3r0zlv6TqCo4VDg_LQMVpT5IeDcaG4"
+ pleroma_web_push_public_key: "BE2DT5J3ajLCCeYhDIOltgD3XmVOFxd6DhXoo5eubtl654utL2fyLURKF3r0zlv6TqCo4VDg_LQMVpT5IeDcaG4"
+
+ # For development you can use: "VhL4NlvINn5VGbxluCQrR-Iy3AFvtA4wWKH1B8vsiVk"
+ pleroma_web_push_private_key: "VhL4NlvINn5VGbxluCQrR-Iy3AFvtA4wWKH1B8vsiVk"