Procházet zdrojové kódy

Set two variable files from site.yml

That way we can override all the config from a central location. The
`user.yml` file overrides `defaults.yml`. `user.yml` was added to
`.gitignore` in order to allow a user to change it without having to
worry about merges. It's easy to do a diff to see what changed between
the defaults and your own settings.

Needs documentation, this is just a proposal.

Refs #39
Greg Karékinian před 11 roky
rodič
revize
46885dc762
4 změnil soubory, kde provedl 130 přidání a 0 odebrání
  1. 1
    0
      .gitignore
  2. 3
    0
      site.yml
  3. 63
    0
      vars/defaults.yml
  4. 63
    0
      vars/user.yml

+ 1
- 0
.gitignore Zobrazit soubor

@@ -0,0 +1 @@
1
+/vars/user.yml

+ 3
- 0
site.yml Zobrazit soubor

@@ -5,6 +5,9 @@
5 5
   user: deploy
6 6
   sudo: True
7 7
   gather_facts: False
8
+  vars_files:
9
+    - vars/defaults.yml
10
+    - vars/user.yml
8 11
 
9 12
   roles:
10 13
     - common

+ 63
- 0
vars/defaults.yml Zobrazit soubor

@@ -0,0 +1,63 @@
1
+---
2
+# roles/blog/vars/main.yml
3
+blog_domain: TODO.com
4
+
5
+# roles/common/vars/main.yml
6
+main_user_name: TODO
7
+admin_email: TODO@TODO.com
8
+encfs_password: TODO
9
+
10
+# roles/ircbouncer/vars/main.yml
11
+znc_version: 1.0
12
+
13
+# roles/mailserver/vars/main.yml
14
+mail_server_hostname: mail.TODO.com
15
+mail_mysql_username: mailuser
16
+mail_mysql_password: TODO
17
+mail_mysql_database: mailserver
18
+mail_virtual_domains:
19
+  - name: TODO
20
+    pk_id: 1
21
+    primary_user: TODO
22
+  - name: TODO
23
+    pk_id: 2
24
+    primary_user: TODO
25
+mail_virtual_users:
26
+  - address: TODO@TODO.com
27
+    password_hash: TODO
28
+    domain_pk_id: 1
29
+  - address: TODO@TODO.com
30
+    password_hash: TODO@TODO.com
31
+    domain_pk_id: 2
32
+mail_virtual_aliases:
33
+  - source: root@TODO.com
34
+    destination: TODO@TODO.com
35
+    domain_pk_id: 1
36
+  - source: postmaster@TODO.com
37
+    destination: TODO@TODO.com
38
+    domain_pk_id: 1
39
+
40
+# roles/monitoring/vars/main.yml
41
+
42
+
43
+# roles/owncloud/vars/main.yml
44
+owncloud_domain: cloud.TODO.com
45
+owncloud_mysql_username: owncloud
46
+owncloud_mysql_password: TODO
47
+owncloud_mysql_database: owncloud
48
+
49
+# roles/tarsnap/vars/main.yml
50
+tarsnap_version: 1.0.35
51
+
52
+# roles/vpn/vars/main.yml
53
+key_country: TODO
54
+key_province: TODO
55
+key_city: TODO
56
+key_org: TODO
57
+key_email: TODO
58
+key_ou: TODO
59
+key_cn: TODO
60
+key_name: TODO
61
+
62
+# roles/webmail/vars/main.yml
63
+webmail_domain: TODO.com

+ 63
- 0
vars/user.yml Zobrazit soubor

@@ -0,0 +1,63 @@
1
+---
2
+# roles/blog/vars/main.yml
3
+blog_domain: TODO.com
4
+
5
+# roles/common/vars/main.yml
6
+main_user_name: TODO
7
+admin_email: TODO@TODO.com
8
+encfs_password: TODO
9
+
10
+# roles/ircbouncer/vars/main.yml
11
+znc_version: 1.0
12
+
13
+# roles/mailserver/vars/main.yml
14
+mail_server_hostname: mail.TODO.com
15
+mail_mysql_username: mailuser
16
+mail_mysql_password: TODO
17
+mail_mysql_database: mailserver
18
+mail_virtual_domains:
19
+  - name: TODO
20
+    pk_id: 1
21
+    primary_user: TODO
22
+  - name: TODO
23
+    pk_id: 2
24
+    primary_user: TODO
25
+mail_virtual_users:
26
+  - address: TODO@TODO.com
27
+    password_hash: TODO
28
+    domain_pk_id: 1
29
+  - address: TODO@TODO.com
30
+    password_hash: TODO@TODO.com
31
+    domain_pk_id: 2
32
+mail_virtual_aliases:
33
+  - source: root@TODO.com
34
+    destination: TODO@TODO.com
35
+    domain_pk_id: 1
36
+  - source: postmaster@TODO.com
37
+    destination: TODO@TODO.com
38
+    domain_pk_id: 1
39
+
40
+# roles/monitoring/vars/main.yml
41
+
42
+
43
+# roles/owncloud/vars/main.yml
44
+owncloud_domain: cloud.TODO.com
45
+owncloud_mysql_username: owncloud
46
+owncloud_mysql_password: TODO
47
+owncloud_mysql_database: owncloud
48
+
49
+# roles/tarsnap/vars/main.yml
50
+tarsnap_version: 1.0.35
51
+
52
+# roles/vpn/vars/main.yml
53
+key_country: TODO
54
+key_province: TODO
55
+key_city: TODO
56
+key_org: TODO
57
+key_email: TODO
58
+key_ou: TODO
59
+key_cn: TODO
60
+key_name: TODO
61
+
62
+# roles/webmail/vars/main.yml
63
+webmail_domain: TODO.com

Loading…
Zrušit
Uložit