summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2014-07-21 02:48:59 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2014-07-21 02:48:59 +0200
commit03d2d91650c148192c713b8cf2c6c7a7e1c20bf1 (patch)
tree57ce75c9b600251f7cb339f4ca03e0ec5dc147d9 /roles
parent1940825e818917eeeefba7b5b5f91049b9a65e93 (diff)
downloadplaybooks-ansible-03d2d91650c148192c713b8cf2c6c7a7e1c20bf1.tar.gz
playbooks-ansible-03d2d91650c148192c713b8cf2c6c7a7e1c20bf1.tar.xz
playbooks-ansible-03d2d91650c148192c713b8cf2c6c7a7e1c20bf1.zip
Add couchDB configuration
Setup cozy configuration directory Add nodejs installation tools Add vars file
Diffstat (limited to 'roles')
-rw-r--r--roles/cozycloud/tasks/couchdb.yml14
-rw-r--r--roles/cozycloud/tasks/dirs.yml5
-rw-r--r--roles/cozycloud/tasks/npm.yml8
-rw-r--r--roles/cozycloud/tasks/pkgs.yml1
-rw-r--r--roles/cozycloud/templates/controller.token.j21
-rw-r--r--roles/cozycloud/templates/couchdb.login.j22
-rw-r--r--roles/cozycloud/vars/main.yml5
7 files changed, 35 insertions, 1 deletions
diff --git a/roles/cozycloud/tasks/couchdb.yml b/roles/cozycloud/tasks/couchdb.yml
new file mode 100644
index 0000000..08392dd
--- /dev/null
+++ b/roles/cozycloud/tasks/couchdb.yml
@@ -0,0 +1,14 @@
+- name: Configuration du login/pwd de CouchDB
+ command: /usr/bin/curl -X PUT http://127.0.0.1:5984/_config/admins/{{ yourlogin }} -d '"{{ yourpassword }}"'
+
+- name: Fichier de configuration couchdb pour Cozy
+ template: src=couchdb.login.j2 dest=/etc/cozy/couchdb.login
+ owner=cozy-data-system
+ group=cozy-data-system
+ mode=700
+
+- name: Création d'un jeton d'authentification
+ template: src=controller.token.j2 dest=/etc/cozy/controller.token
+ owner=cozy-home
+ group=cozy-home
+ mode=700
diff --git a/roles/cozycloud/tasks/dirs.yml b/roles/cozycloud/tasks/dirs.yml
new file mode 100644
index 0000000..6a8bd0a
--- /dev/null
+++ b/roles/cozycloud/tasks/dirs.yml
@@ -0,0 +1,5 @@
+- name: Création répertoire de configuration
+ file: name={{ item }} state=directory
+ with_items:
+ - /etc/cozy
+ - /etc/cozy/pids
diff --git a/roles/cozycloud/tasks/npm.yml b/roles/cozycloud/tasks/npm.yml
new file mode 100644
index 0000000..65ec517
--- /dev/null
+++ b/roles/cozycloud/tasks/npm.yml
@@ -0,0 +1,8 @@
+- name: Installation outils NodeJS
+ npm: name={{ item }} global=yes state=present
+ with_items:
+ - cozy-monitor
+ - compound
+ - coffee-script
+ - brunch
+ - cozy-controller
diff --git a/roles/cozycloud/tasks/pkgs.yml b/roles/cozycloud/tasks/pkgs.yml
index e8954b5..1758ae4 100644
--- a/roles/cozycloud/tasks/pkgs.yml
+++ b/roles/cozycloud/tasks/pkgs.yml
@@ -18,4 +18,3 @@
- openssl-devel
- mozjs24-devel
- couchdb
- - coffee-script
diff --git a/roles/cozycloud/templates/controller.token.j2 b/roles/cozycloud/templates/controller.token.j2
new file mode 100644
index 0000000..300e288
--- /dev/null
+++ b/roles/cozycloud/templates/controller.token.j2
@@ -0,0 +1 @@
+{{ yourtoken }}
diff --git a/roles/cozycloud/templates/couchdb.login.j2 b/roles/cozycloud/templates/couchdb.login.j2
new file mode 100644
index 0000000..63a10d7
--- /dev/null
+++ b/roles/cozycloud/templates/couchdb.login.j2
@@ -0,0 +1,2 @@
+{{ yourlogin }}
+{{ yourpassword }}
diff --git a/roles/cozycloud/vars/main.yml b/roles/cozycloud/vars/main.yml
new file mode 100644
index 0000000..b8bd572
--- /dev/null
+++ b/roles/cozycloud/vars/main.yml
@@ -0,0 +1,5 @@
+---
+
+yourlogin: INSERT_A_RANDOM_LOGIN_HERE
+yourpassword: INSERT_A_RANDOM_PASSWORD_HERE
+yourtoken: INSERT_A_RANDOM_STRING_HERE