Browse Source

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

# Conflicts:
#	roles/common/tasks/users.yml
Alex Payne 9 years ago
parent
commit
34e94aa4c2

+ 3
- 3
roles/common/tasks/encfs.yml View File

8
 - name: Create encrypted directory
8
 - name: Create encrypted directory
9
   file: state=directory path=/encrypted
9
   file: state=directory path=/encrypted
10
 
10
 
11
-- name: Create decrypted directory
12
-  file: state=directory path=/decrypted
13
-
14
 - name: Add mail user to fuse group
11
 - name: Add mail user to fuse group
15
   user: name=mail append=yes groups=fuse
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
 # Check if the /encrypted directory is empty
17
 # Check if the /encrypted directory is empty
18
 - name: Check for existing encfs
18
 - name: Check for existing encfs
19
   shell: ls /encrypted/*
19
   shell: ls /encrypted/*

+ 9
- 0
roles/common/tasks/main.yml View File

1
 ---
1
 ---
2
 # Defines tasks applicable across all machines in the infrastructure.
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
 - name: Update apt cache
7
 - name: Update apt cache
5
   apt: update_cache=yes
8
   apt: update_cache=yes
57
   notify: restart apache
60
   notify: restart apache
58
   when: ansible_distribution_release == 'trusty'
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
 - include: encfs.yml tags=encfs
69
 - include: encfs.yml tags=encfs
61
 - include: users.yml tags=users
70
 - include: users.yml tags=users
62
 - include: ssl.yml tags=ssl
71
 - include: ssl.yml tags=ssl

+ 1
- 1
roles/common/tasks/users.yml View File

1
 - name: Create main user account
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
 - name: Give main user account sudo power
4
 - name: Give main user account sudo power
5
   template: src=roles/common/templates/sudoers.j2 dest=/etc/sudoers.d/sudoers owner=root group=root mode=0440 validate='visudo -cf %s'
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 View File

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 View File

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

+ 10
- 6
roles/owncloud/tasks/owncloud.yml View File

1
 ---
1
 ---
2
 # Installs the ownCloud personal cloud software
2
 # Installs the ownCloud personal cloud software
3
 # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
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
 - name: Create database user for ownCloud
15
 - name: Create database user for ownCloud
6
   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
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
 - name: Install ownCloud (possibly from OpenSuSE repository)
45
 - name: Install ownCloud (possibly from OpenSuSE repository)
36
   apt: pkg=owncloud update_cache=yes
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
 - name: Owncloud www directory
48
 - name: Owncloud www directory
45
   file: state=directory path=/var/www/owncloud
49
   file: state=directory path=/var/www/owncloud
46
 
50
 

+ 3
- 0
roles/webmail/tasks/roundcube.yml View File

59
 - name: Configure the Apache HTTP server for roundcube
59
 - name: Configure the Apache HTTP server for roundcube
60
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube.conf group=root owner=root force=yes
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
 - name: Configure roundcube
65
 - name: Configure roundcube
63
   copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
66
   copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
64
   with_items:
67
   with_items:

Loading…
Cancel
Save