commit
fd8f4ec09c
|
@ -11,7 +11,7 @@ Requirements
|
||||||
|
|
||||||
- aptitude or python-apt (required by apt tasks)
|
- aptitude or python-apt (required by apt tasks)
|
||||||
- python > 2.5 (required by ini_file tasks)
|
- python > 2.5 (required by ini_file tasks)
|
||||||
- Ansible >= 1.8.0
|
- Ansible >= 2.0
|
||||||
|
|
||||||
This role is designed to work against a modern Ubuntu system. (Tested on Ubuntu 13.10 and 14.04) It should
|
This role is designed to work against a modern Ubuntu system. (Tested on Ubuntu 13.10 and 14.04) It should
|
||||||
theoretically work on older versions of Ubuntu or Debian based systems.
|
theoretically work on older versions of Ubuntu or Debian based systems.
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
# handlers file for ansible-rookeries
|
|
|
@ -9,15 +9,26 @@ galaxy_info:
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- trusty
|
- trusty
|
||||||
|
- xenial
|
||||||
categories:
|
categories:
|
||||||
- development
|
- development
|
||||||
- web
|
- web
|
||||||
dependencies:
|
dependencies:
|
||||||
- role: dorianpula.nginx-uwsgi-supervisor
|
# - role: "git+https://bitbucket.org/dorianpula/ansible-nginx-uwsgi-supervisor,,nginx-uwsgi-supervisor"
|
||||||
app_name: "{{ rookeries_app_name }}"
|
- role: "uwsgi-nginx-supervisor"
|
||||||
app_root_path: "{{ rookeries_app_symlink }}"
|
uwsgi_app_name: "{{ rookeries_app_name }}"
|
||||||
app_venv: "{{ rookeries_venv_symlink }}"
|
uwsgi_app_root_path: "{{ rookeries_app_symlink }}"
|
||||||
app_nginx_hostname: "{{ rookeries_app_hostname }}"
|
uwsgi_app_venv: "{{ rookeries_venv_symlink }}"
|
||||||
app_uwsgi_port: "{{ rookeries_local_uwsgi_port }}"
|
uwsgi_app_nginx_hostname: "{{ rookeries_app_hostname }}"
|
||||||
app_uwsgi_executable: "rookeries:make_rookeries_app()"
|
uwsgi_app_port: "{{ rookeries_local_uwsgi_port }}"
|
||||||
app_uwsgi_envs: "{{ rookeries_app_config }}"
|
uwsgi_app_executable: "rookeries:make_rookeries_app()"
|
||||||
|
uwsgi_app_envs: "{{ rookeries_app_config }}"
|
||||||
|
# - role: "git+https://bitbucket.org/dorianpula/ansible-nodejs,,nodejs"
|
||||||
|
- role: "nodejs"
|
||||||
|
node_version_family: "5.x"
|
||||||
|
globally_installed_tools:
|
||||||
|
- browserify
|
||||||
|
- coffee-script
|
||||||
|
- less
|
||||||
|
- grunt-cli
|
||||||
|
- karma-cli
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
when: rookeries_environ_type == "dev"
|
when: rookeries_environ_type == "dev"
|
||||||
|
|
||||||
- name: upload supervisor configuration to web server home
|
- name: upload supervisor configuration to web server home
|
||||||
template: src=dev_supervisor/mailsink_supervisor.conf dest=/etc/supervisor/conf.d/mailsink_supervisor.conf
|
template: src=mailsink_supervisor.conf dest=/etc/supervisor/conf.d/mailsink_supervisor.conf
|
||||||
sudo: yes
|
sudo: yes
|
||||||
when: rookeries_environ_type == "dev"
|
when: rookeries_environ_type == "dev"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
- include: nodejs.yaml
|
|
||||||
- include: couchdb.yaml
|
- include: couchdb.yaml
|
||||||
- include: dev_email_server.yaml
|
- include: dev_email_server.yaml
|
||||||
- include: rookeries_deployment.yaml
|
- include: rookeries_deployment.yaml
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
- name: install systems to help setup nodejs
|
|
||||||
apt: pkg={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- python-apt
|
|
||||||
- git
|
|
||||||
- apt-transport-https
|
|
||||||
|
|
||||||
- name: add the nodesource repository
|
|
||||||
apt_key: url=https://deb.nodesource.com/gpgkey/nodesource.gpg.key state=present
|
|
||||||
|
|
||||||
- name: add the nodesource binary repository
|
|
||||||
apt_repository: repo="deb https://deb.nodesource.com/node_0.12 {{ ansible_lsb.codename }} main"
|
|
||||||
state=present
|
|
||||||
|
|
||||||
- name: add the nodesource source repository
|
|
||||||
apt_repository: repo="deb-src https://deb.nodesource.com/node_0.12 {{ ansible_lsb.codename }} main"
|
|
||||||
state=present update_cache=yes
|
|
||||||
|
|
||||||
- name: install nodejs + npm
|
|
||||||
apt: pkg=nodejs state=present
|
|
||||||
|
|
||||||
- name: check if nodejs binary exists and needs linking to node binary
|
|
||||||
stat: path=/usr/bin/nodejs
|
|
||||||
register: nodejs_bin
|
|
||||||
|
|
||||||
- name: link nodejs binary correctly
|
|
||||||
file: src=/usr/bin/nodejs dest=/usr/bin/node state=link
|
|
||||||
when: nodejs_bin.stat.exists
|
|
||||||
|
|
||||||
- name: install coffeescript + less dependencies
|
|
||||||
npm: name={{ item }} global=yes state=present registry=http://registry.npmjs.org/
|
|
||||||
with_items:
|
|
||||||
- less
|
|
||||||
- browserify
|
|
|
@ -30,7 +30,7 @@
|
||||||
when: deploy_package.stat.exists
|
when: deploy_package.stat.exists
|
||||||
|
|
||||||
- name: install frontend dependencies for app
|
- name: install frontend dependencies for app
|
||||||
npm: path={{ rookeries_deploy_dir }} state=present registry=http://registry.npmjs.org/
|
npm: path={{ rookeries_deploy_dir }} state=present production=yes
|
||||||
when: deploy_package.stat.exists
|
when: deploy_package.stat.exists
|
||||||
|
|
||||||
- name: add in symlink to deployed package.
|
- name: add in symlink to deployed package.
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
---
|
---
|
||||||
# App name reused from the nginx-uwsgi-supervisor roles
|
# App name reused from the nginx-uwsgi-supervisor roles
|
||||||
app_name: "{{ rookeries_app_name }}"
|
app_name: "{{ rookeries_app_name }}"
|
||||||
|
web_root_path: /srv/www
|
||||||
|
virtualenv_root_path: "{{ web_root_path }}/virtualenvs"
|
||||||
|
web_server_group: www-data
|
||||||
|
|
||||||
# Introduced from deployment playbook
|
# Introduced from deployment playbook
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue