98:71b26e892a16
Anton Shestakov <av6@dwimlabs.net>, Tue, 05 Apr 2016 22:20:37 +0800
provision: make clear that encryption is required for this setup

next change 211:4b03f725cb69
previous change 38:91e692b46f92

contrib/provision/roles/tram-im/tasks/main.yml

Permissions: -rw-r--r--

Other formats: Feeds:
---
- name: Set hostnames
lineinfile: dest=/etc/hosts line='{{ ansible_all_ipv4_addresses[0] }} {{ domain }} muc.{{ domain }}'
when: ansible_virtualization_type == "virtualbox"
- name: Install packages
apt: pkg={{ item }} state=present
with_items:
- git # for 3rd-party libraries
tags: [packages]
- stat: path='{{ ssl_cert }}'
register: certfile
- stat: path='{{ ssl_key }}'
register: keyfile
- name: Ensure certificate exists
assert:
that:
- '{{ certfile.stat.exists }}'
- '{{ keyfile.stat.exists }}'
- name: Create user
user: name={{ user }}
- include: appinstall.yml
sudo: yes
sudo_user: '{{ user }}'
- name: Add Prosody VirtualHost
template: src=etc/prosody/conf.avail/tram-im.cfg.lua dest=/etc/prosody/conf.avail/{{ domain }}.cfg.lua
notify:
- restart prosody
- name: Enable Prosody VirtualHost
file: src=/etc/prosody/conf.avail/{{ domain }}.cfg.lua dest=/etc/prosody/conf.d/{{ domain }}.cfg.lua state=link
notify:
- restart prosody
- name: Add BOSH proxy Nginx site
template: src=etc/nginx/sites-available/tram-im dest=/etc/nginx/sites-available/{{ domain }}
notify:
- restart nginx
- name: Enable BOSH proxy Nginx site
file: src=/etc/nginx/sites-available/{{ domain }} dest=/etc/nginx/sites-enabled/50{{ domain }} state=link
notify:
- restart nginx
...