Skip to content
Snippets Groups Projects
Commit ff0699ec authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent 32a015b8
No related branches found
No related tags found
No related merge requests found
discourse_git_repo: 'https://github.com/discourse/discourse_docker.git'
discourse_domain: ''
discourse_git_repo: https://github.com/discourse/discourse_docker.git
discourse_domain:
---
# file: roles/discourse/tasks/apache.yml
- name: "Apache Configuration File"
- name: Apache Configuration File
template:
src: 'vhost.conf'
dest: '/etc/apache2/sites-available/discourse{{ apache_conf_ext }}'
owner: 'root'
group: 'root'
mode: '664'
src: vhost.conf
dest: /etc/apache2/sites-available/discourse{{ apache_conf_ext }}
owner: root
group: root
mode: 664
notify:
- "Apache | Restart Apache"
- name: "Apache enable our new site(s)"
- name: Apache enable our new site(s)
command: a2ensite discourse creates=/etc/apache2/sites-enabled/discourse{{ apache_conf_ext }}
notify:
- "Apache | Restart Apache"
- block:
- name: "Setup AuthType Basic"
- name: Setup AuthType Basic
htpasswd:
path: '/var/discourse/containers/passwords'
path: /var/discourse/containers/passwords
name: '{{ discourse_apache_auth.user }}'
password: '{{ discourse_apache_auth.password }}'
owner: 'root'
group: 'root'
mode: '664'
owner: root
group: root
mode: 664
when: discourse_apache_auth is defined
---
# file: roles/discourse/tasks/install.yml
- name: "Clone Repository"
- name: Clone Repository
git:
accept_hostkey: yes
repo: '{{ discourse_git_repo }}'
dest: '/var/discourse'
dest: /var/discourse
register: discourse_repository
- block:
- name: "Configure"
- name: Configure
template:
src: 'app.yml'
dest: '/var/discourse/containers/app.yml'
owner: 'root'
group: 'root'
mode: '664'
src: app.yml
dest: /var/discourse/containers/app.yml
owner: root
group: root
mode: 664
- name: "Install and Build"
shell: '/var/discourse/launcher rebuild app'
- name: Install and Build
shell: /var/discourse/launcher rebuild app
when: discourse_repository.changed
- name: "Configure Apache"
- name: Configure Apache
import_tasks: apache.yml
---
# file: roles/discourse/tasks/main.yml
- name: "Docker Discourse"
set_fact: role_discourse_started=true
tags: 'always'
- name: Docker Discourse
set_fact:
role_discourse_started: yes
tags:
- always
- block:
- name: "Install Certs"
include_tasks: '../../letsencrypt/tasks/cert.yml'
- name: Install Certs
include_tasks: ../../letsencrypt/tasks/cert.yml
with_items:
- domain: '{{ discourse_domain }}'
loop_control:
loop_var: domain
when: discourse_protocol|default("https") == "https" and discourse_letsencrypt|default(true)
when: '"letsencrypt" not in excluded_roles and groups.proxyserver is not defined'
when: not excluded_roles or "letsencrypt" not in excluded_roles and groups.proxyserver is not defined
- block:
- name: "Install Discourse"
- name: Install Discourse
import_tasks: install.yml
when: '"discourse" not in excluded_roles'
when: not excluded_roles or "discourse" not in excluded_roles
......@@ -47,7 +47,7 @@ env:
#UNICORN_WORKERS: 3
## TODO: The domain name this Discourse instance will respond to
DISCOURSE_HOSTNAME: {{ discourse_domain }}
DISCOURSE_HOSTNAME: '{{ discourse_domain }}'
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
......@@ -58,9 +58,9 @@ env:
DISCOURSE_DEVELOPER_EMAILS: '{{ apache_server_admin }}'
## TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: {{ discourse_smtp.host }}
DISCOURSE_SMTP_PORT: {{ discourse_smtp.port }}
DISCOURSE_SMTP_USER_NAME: {{ discourse_smtp.user }}
DISCOURSE_SMTP_ADDRESS: '{{ discourse_smtp.host }}'
DISCOURSE_SMTP_PORT: '{{ discourse_smtp.port }}'
DISCOURSE_SMTP_USER_NAME: '{{ discourse_smtp.user }}'
DISCOURSE_SMTP_PASSWORD: "{{ discourse_smtp.pass }}"
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment