--- a/provision/playbook.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/playbook.yml Thu Jul 21 17:15:21 2016 +0800
- - lineinfile: dest=/etc/hosts line="127.0.0.1 fruitbar.{{ umbrella }}"
+ line: '127.0.0.1 fruitbar.{{ umbrella }}'
when: ansible_virtualization_type == "virtualbox"
- - apt: update_cache=yes cache_valid_time=3600
--- a/provision/roles/fruitbar/handlers/main.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/roles/fruitbar/handlers/main.yml Thu Jul 21 17:15:21 2016 +0800
- supervisorctl: name=fruitbar state=restarted
--- a/provision/roles/fruitbar/tasks/appinstall.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/roles/fruitbar/tasks/appinstall.yml Thu Jul 21 17:15:21 2016 +0800
- name: Ensure ~/webapps/ exists with world-readable permissions
- file: path=/home/{{ user }}/webapps/ state=directory mode=0755
+ path: /home/{{ user }}/webapps/
- copy: src=.hgrc dest=/home/{{ user }}/.hgrc
+ dest: /home/{{ user }}/.hgrc
- pip: requirements=/home/{{ user }}/webapps/fruitbar/REQUIREMENTS virtualenv=/home/{{ user }}/webapps/fruitbar/venv/
+ requirements: /home/{{ user }}/webapps/fruitbar/REQUIREMENTS
+ virtualenv: /home/{{ user }}/webapps/fruitbar/venv/
- name: Install wsgi stuff
- pip: name={{ item }} state=latest virtualenv=/home/{{ user }}/webapps/fruitbar/venv/
+ virtualenv: /home/{{ user }}/webapps/fruitbar/venv/
- name: Add gunicorn config
- template: src=gunicorn.conf dest=/home/{{ user }}/webapps/fruitbar/gunicorn.conf
+ dest: /home/{{ user }}/webapps/fruitbar/gunicorn.conf
--- a/provision/roles/fruitbar/tasks/main.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/roles/fruitbar/tasks/main.yml Thu Jul 21 17:15:21 2016 +0800
- apt: pkg={{ item }} state=present
- name: Install virtualenv
- apt: pkg=virtualenv state=present
when: ansible_distribution_release == 'jessie'
- include: appinstall.yml
become_user: '{{ user }}'
- name: Add supervisor app
- template: src=etc/supervisor/conf.d/fruitbar.conf dest=/etc/supervisor/conf.d/fruitbar.conf
+ src: etc/supervisor/conf.d/fruitbar.conf
+ dest: /etc/supervisor/conf.d/fruitbar.conf
-- stat: path='{{ ssl_cert }}'
-- stat: path='{{ ssl_key }}'
- name: Extract information for HPKP header
failed_when: "'unable' in hpkpinfo.stderr"
- template: src=etc/nginx/sites-available/fruitbar dest=/etc/nginx/sites-available/fruitbar.{{ umbrella }}
+ src: etc/nginx/sites-available/fruitbar
+ dest: /etc/nginx/sites-available/fruitbar.{{ umbrella }}
- name: Enable Nginx site
- file: src=/etc/nginx/sites-available/fruitbar.{{ umbrella }} dest=/etc/nginx/sites-enabled/{{ site_order }}fruitbar.{{ umbrella }} state=link
+ src: /etc/nginx/sites-available/fruitbar.{{ umbrella }}
+ dest: /etc/nginx/sites-enabled/{{ site_order }}fruitbar.{{ umbrella }}
--- a/provision/roles/nginx/handlers/main.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/roles/nginx/handlers/main.yml Thu Jul 21 17:15:21 2016 +0800
- service: name=nginx state=restarted
--- a/provision/roles/nginx/tasks/main.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/roles/nginx/tasks/main.yml Thu Jul 21 17:15:21 2016 +0800
- apt: pkg=nginx state=present
- name: Create a Diffie-Hellman key exchange parameters file
- name: Allow HTTP and HTTPS
- ufw: rule=allow name='{{ item }}'
--- a/provision/roles/supervisor/tasks/main.yml Thu Jul 21 17:12:40 2016 +0800
+++ b/provision/roles/supervisor/tasks/main.yml Thu Jul 21 17:15:21 2016 +0800
- apt: pkg=supervisor state=present