--- a/contrib/provision/playbook.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/playbook.yml Thu Jul 07 00:12:35 2016 +0800
- name: Purge unused packages that come preinstalled on Vagrant templates
- apt: pkg={{ item }} state=absent purge=yes
- service: name={{ item }} state=started enabled=yes
--- a/contrib/provision/roles/certs/tasks/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/certs/tasks/main.yml Thu Jul 07 00:12:35 2016 +0800
- apt: pkg={{ item }} state=present
- name: Make sure {{ path }} exists
- file: path='{{ path }}' state=directory owner=root group=ssl-cert mode=0710
- name: Make sure domain directories exist
- file: path='{{ path }}/{{ item }}' state=directory owner=root group=ssl-cert mode=0710
+ path: '{{ path }}/{{ item }}'
with_items: '{{ selfsigned }}'
- name: Generate private keys
with_items: '{{ selfsigned }}'
- name: Set permissions for private keys
- file: path='{{ path }}/{{ item }}/clean.key' state=file owner=root group=ssl-cert mode=0640
+ path: '{{ path }}/{{ item }}/clean.key'
with_items: '{{ selfsigned }}'
- name: Generate self-signed certificates
with_items: '{{ selfsigned }}'
- name: Set permissions for self-signed certificates
- file: path='{{ path }}/{{ item }}/selfsigned.pem' state=file owner=root group=ssl-cert mode=0640
+ path: '{{ path }}/{{ item }}/selfsigned.pem'
with_items: '{{ selfsigned }}'
--- a/contrib/provision/roles/common/tasks/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/common/tasks/main.yml Thu Jul 07 00:12:35 2016 +0800
- name: Set timezone {{ timezone }}
- template: src=etc/timezone dest=/etc/timezone
- locale_gen: name={{ locale }}
- name: Set system locale
command: update-locale LANG={{ locale }}
- name: Install base packages
- apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=3600
- name: Stop installing recommends
- copy: src=etc/apt/apt.conf.d/99recommends dest=/etc/apt/apt.conf.d/99recommends
+ src: etc/apt/apt.conf.d/99recommends
+ dest: /etc/apt/apt.conf.d/99recommends
- ufw: rule=allow name=OpenSSH
--- a/contrib/provision/roles/nginx/handlers/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/nginx/handlers/main.yml Thu Jul 07 00:12:35 2016 +0800
- service: name=nginx state=restarted
--- a/contrib/provision/roles/nginx/tasks/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/nginx/tasks/main.yml Thu Jul 07 00:12:35 2016 +0800
- apt: pkg={{ item }} state=present
- name: Disable default site
- file: path=/etc/nginx/sites-enabled/default state=absent
+ path: /etc/nginx/sites-enabled/default
- name: Allow HTTP and HTTPS
- ufw: rule=allow name='{{ item }}'
--- a/contrib/provision/roles/prosody/handlers/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/prosody/handlers/main.yml Thu Jul 07 00:12:35 2016 +0800
- service: name=prosody state=restarted
--- a/contrib/provision/roles/prosody/tasks/extra-modules.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/prosody/tasks/extra-modules.yml Thu Jul 07 00:12:35 2016 +0800
- name: Fetch extra Prosody modules
- hg: repo=https://hg.prosody.im/prosody-modules/ dest=/var/lib/prosody/extra-modules
+ repo: https://hg.prosody.im/prosody-modules/
+ dest: /var/lib/prosody/extra-modules
--- a/contrib/provision/roles/prosody/tasks/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/prosody/tasks/main.yml Thu Jul 07 00:12:35 2016 +0800
- name: Install server packages
- apt: pkg={{ item }} state=present
- - mercurial # for extra modules
+ - mercurial # for extra modules
- name: Work around default config bug
- file: src=../../ssl/certs/ssl-cert-snakeoil.pem dest=/etc/prosody/certs/localhost.crt state=link
+ src: ../../ssl/certs/ssl-cert-snakeoil.pem
+ dest: /etc/prosody/certs/localhost.crt
- name: Disable localhost VirtualHost
- file: path=/etc/prosody/conf.d/localhost.cfg.lua state=absent
+ path: /etc/prosody/conf.d/localhost.cfg.lua
- ufw: rule=allow port=xmpp-client proto=tcp
when: ansible_virtualization_type == "virtualbox"
--- a/contrib/provision/roles/tram-im/tasks/appinstall.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/tram-im/tasks/appinstall.yml Thu Jul 07 00:12:35 2016 +0800
- name: Make sure project directory exists
- file: path={{ dir }} state=directory
- name: Pull Tram-IM {{ revision }}
- hg: repo={{ repo }} dest={{ dir }} revision={{ revision }}
+ revision: '{{ revision }}'
when: ansible_virtualization_type != "virtualbox"
- name: Make sure vendor directory exists
- file: path={{ dir }}/vendor state=directory
+ path: '{{ dir }}/vendor'
- git: repo=https://github.com/strophe/strophejs.git dest={{ dir }}/vendor/strophejs
+ repo: https://github.com/strophe/strophejs.git
+ dest: '{{ dir }}/vendor/strophejs'
- name: Clone Strophe.js plugins
- git: repo=https://github.com/strophe/strophejs-plugins.git dest={{ dir }}/vendor/strophejs-plugins
+ repo: https://github.com/strophe/strophejs-plugins.git
+ dest: '{{ dir }}/vendor/strophejs-plugins'
- name: Download WebRTC adapter
- get_url: url=https://webrtc.github.io/adapter/adapter-1.0.4.js dest={{ dir }}/vendor/webrtc-adapter-1.0.4.js
+ url: https://webrtc.github.io/adapter/adapter-1.0.4.js
+ dest: '{{ dir }}/vendor/webrtc-adapter-1.0.4.js'
--- a/contrib/provision/roles/tram-im/tasks/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/tram-im/tasks/main.yml Thu Jul 07 00:12:35 2016 +0800
- lineinfile: dest=/etc/hosts line='{{ ansible_all_ipv4_addresses[0] }} {{ domain }} muc.{{ domain }}'
+ line: '{{ ansible_all_ipv4_addresses[0] }} {{ domain }} muc.{{ domain }}'
when: ansible_virtualization_type == "virtualbox"
- apt: pkg={{ item }} state=present
- - git # for 3rd-party libraries
+ - git # for 3rd-party libraries
-- stat: path='{{ ssl_cert }}'
-- stat: path='{{ ssl_key }}'
- name: Ensure certificate exists
- '{{ keyfile.stat.exists }}'
- include: appinstall.yml
- name: Add Prosody VirtualHost
- template: src=etc/prosody/conf.avail/tram-im.cfg.lua dest=/etc/prosody/conf.avail/{{ domain }}.cfg.lua
+ src: etc/prosody/conf.avail/tram-im.cfg.lua
+ dest: /etc/prosody/conf.avail/{{ domain }}.cfg.lua
- name: Enable Prosody VirtualHost
- file: src=/etc/prosody/conf.avail/{{ domain }}.cfg.lua dest=/etc/prosody/conf.d/{{ domain }}.cfg.lua state=link
+ src: /etc/prosody/conf.avail/{{ domain }}.cfg.lua
+ dest: /etc/prosody/conf.d/{{ domain }}.cfg.lua
- name: Add BOSH proxy Nginx site
- template: src=etc/nginx/sites-available/tram-im dest=/etc/nginx/sites-available/{{ domain }}
+ src: etc/nginx/sites-available/tram-im
+ dest: /etc/nginx/sites-available/{{ domain }}
- name: Enable BOSH proxy Nginx site
- file: src=/etc/nginx/sites-available/{{ domain }} dest=/etc/nginx/sites-enabled/50{{ domain }} state=link
+ src: /etc/nginx/sites-available/{{ domain }}
+ dest: /etc/nginx/sites-enabled/50{{ domain }}
--- a/contrib/provision/roles/turnserver/handlers/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/turnserver/handlers/main.yml Thu Jul 07 00:12:35 2016 +0800
- name: restart resiprocate-turn-server
- service: name=resiprocate-turn-server state=restarted
+ name: resiprocate-turn-server
--- a/contrib/provision/roles/turnserver/tasks/main.yml Wed Jun 01 22:46:32 2016 +0800
+++ b/contrib/provision/roles/turnserver/tasks/main.yml Thu Jul 07 00:12:35 2016 +0800
- apt: pkg={{ item }} state=present
- resiprocate-turn-server
- ufw: rule=allow port=3478