Parcourir la source

Merge branch 'master' of github.com:al3x/sovereign

# Conflicts:
#	roles/common/tasks/users.yml
Alex Payne il y a 9 ans
Parent
révision
34e94aa4c2

+ 3
- 3
roles/common/tasks/encfs.yml Voir le fichier

@@ -8,12 +8,12 @@
8 8
 - name: Create encrypted directory
9 9
   file: state=directory path=/encrypted
10 10
 
11
-- name: Create decrypted directory
12
-  file: state=directory path=/decrypted
13
-
14 11
 - name: Add mail user to fuse group
15 12
   user: name=mail append=yes groups=fuse
16 13
 
14
+- name: Add main user to fuse group
15
+  user: name={{ main_user_name }} append=yes groups=fuse
16
+
17 17
 # Check if the /encrypted directory is empty
18 18
 - name: Check for existing encfs
19 19
   shell: ls /encrypted/*

+ 9
- 0
roles/common/tasks/main.yml Voir le fichier

@@ -1,5 +1,8 @@
1 1
 ---
2 2
 # Defines tasks applicable across all machines in the infrastructure.
3
+- name: Set up closest mirror autoselect (ubuntu-only)
4
+  template: src=apt_sources.list.j2 dest=/etc/apt/sources.list
5
+  when: ansible_distribution == 'Ubuntu'
3 6
 
4 7
 - name: Update apt cache
5 8
   apt: update_cache=yes
@@ -57,6 +60,12 @@
57 60
   notify: restart apache
58 61
   when: ansible_distribution_release == 'trusty'
59 62
 
63
+- name: Create decrypted directory (even if encfs isn't used)
64
+  file: state=directory path=/decrypted
65
+
66
+- name: Set decrypted directory permissions
67
+  file: state=directory path=/decrypted group=mail mode=775
68
+
60 69
 - include: encfs.yml tags=encfs
61 70
 - include: users.yml tags=users
62 71
 - include: ssl.yml tags=ssl

+ 1
- 1
roles/common/tasks/users.yml Voir le fichier

@@ -1,5 +1,5 @@
1 1
 - name: Create main user account
2
-  user: name={{ main_user_name }} state=present shell={{ main_user_shell }} groups=sudo,fuse
2
+  user: name={{ main_user_name }} state=present shell={{ main_user_shell }} groups=sudo
3 3
 
4 4
 - name: Give main user account sudo power
5 5
   template: src=roles/common/templates/sudoers.j2 dest=/etc/sudoers.d/sudoers owner=root group=root mode=0440 validate='visudo -cf %s'

+ 5
- 0
roles/common/templates/apt_sources.list.j2 Voir le fichier

@@ -0,0 +1,5 @@
1
+# This file is generated by Sovereign
2
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }} main restricted universe multiverse
3
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }}-updates main restricted universe multiverse
4
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }}-backports main restricted universe multiverse
5
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }}-security main restricted universe multiverse

+ 2
- 1
roles/news/templates/var_www_selfoss_config.ini.j2 Voir le fichier

@@ -23,6 +23,7 @@ auto_mark_as_read=1
23 23
 anonymizer=
24 24
 use_system_font=1
25 25
 readability=
26
-share=gtfprde
26
+share=gtfprdew
27
+wallabag=https://read.{{domain}}
27 28
 allow_public_update_access=0
28 29
 unread_order=

+ 10
- 6
roles/owncloud/tasks/owncloud.yml Voir le fichier

@@ -1,6 +1,16 @@
1 1
 ---
2 2
 # Installs the ownCloud personal cloud software
3 3
 # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
4
+- name: Install dependencies
5
+  apt: pkg={{ item }} state=present
6
+  with_items:
7
+    - libapache2-mod-php5
8
+    - php-apc
9
+    - python-psycopg2
10
+    - postgresql-9.3
11
+
12
+- name: Set postgres password
13
+  command: sudo -u {{ db_admin_username }} psql -d {{ db_admin_username }} -c "ALTER USER postgres with  password '{{ db_admin_password }}';"
4 14
 
5 15
 - name: Create database user for ownCloud
6 16
   postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ owncloud_db_username }} password="{{ owncloud_db_password }}" state=present
@@ -35,12 +45,6 @@
35 45
 - name: Install ownCloud (possibly from OpenSuSE repository)
36 46
   apt: pkg=owncloud update_cache=yes
37 47
 
38
-- name: Install PHP dependencies
39
-  apt: pkg={{ item }} state=present
40
-  with_items:
41
-    - libapache2-mod-php5
42
-    - php-apc
43
-
44 48
 - name: Owncloud www directory
45 49
   file: state=directory path=/var/www/owncloud
46 50
 

+ 3
- 0
roles/webmail/tasks/roundcube.yml Voir le fichier

@@ -59,6 +59,9 @@
59 59
 - name: Configure the Apache HTTP server for roundcube
60 60
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube.conf group=root owner=root force=yes
61 61
 
62
+- name: Enable php5-mcrypt
63
+  file: src=/etc/php5/mods-available/mcrypt.ini dest=/etc/php5/apache2/conf.d/20-mcrypt.ini owner=root group=root state=link
64
+
62 65
 - name: Configure roundcube
63 66
   copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
64 67
   with_items:

Chargement…
Annuler
Enregistrer