[ansible] added deploy role

This commit is contained in:
2018-03-28 16:38:16 +03:00
parent f6ebec32ca
commit 6d2a1a002b
26 changed files with 129 additions and 139 deletions

View File

@@ -0,0 +1,10 @@
- name: Install the package "Neko"
apt:
name: 'neko'
- name: Install the package "Node"
apt:
name: '{{ item }}'
with_items:
- nodejs
- npm

View File

@@ -0,0 +1,6 @@
- import_tasks: apt.yml
when: ansible_distribution|lower == 'ubuntu'
- import_tasks: npm.yml
- import_tasks: service.yml

View File

@@ -0,0 +1,4 @@
- name: Install "gulp-cli" node.js package globally.
npm:
name: gulp-cli
global: yes

View File

@@ -0,0 +1,10 @@
- name: "install {{ service_name }} systemd unit file"
template:
src: "template/service.j2"
dest: "/etc/systemd/system/{{ service_name }}.service"
- name: "start {{ service_name }} service"
systemd:
state: started
name: "{{ service_name }}"
daemon_reload: yes