danarchy_deploy 0.2.6 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.asdf_versions.json +5 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +9 -8
- data/danarchy_deploy.gemspec +4 -4
- data/lib/danarchy_deploy/groups.rb +0 -1
- data/lib/danarchy_deploy/services/init/openrc.rb +10 -6
- data/lib/danarchy_deploy/services/init.rb +28 -18
- data/lib/danarchy_deploy/services.rb +0 -1
- data/lib/danarchy_deploy/system/centos.rb +7 -0
- data/lib/danarchy_deploy/system/debian.rb +6 -0
- data/lib/danarchy_deploy/system/gentoo.rb +83 -23
- data/lib/danarchy_deploy/system/opensuse.rb +6 -0
- data/lib/danarchy_deploy/system.rb +22 -10
- data/lib/danarchy_deploy/templater.rb +26 -9
- data/lib/danarchy_deploy/users.rb +50 -42
- data/lib/danarchy_deploy/version.rb +1 -1
- data/lib/danarchy_deploy.rb +61 -19
- data/templates/applications/nginx/domain.conf.erb +38 -0
- data/templates/applications/php/phpfpm.conf.erb +19 -0
- data/templates/applications/php/user.conf.erb +19 -0
- data/templates/applications/wordpress/mysql_user_privileges.sql.erb +2 -0
- data/templates/applications/wordpress/wp-config.php.erb +82 -0
- data/templates/asdf/asdf.sh.erb +52 -0
- data/templates/deploy_template.json +76 -50
- data/templates/distcc/distccd.erb +14 -0
- data/templates/distcc/hosts.erb +2 -0
- data/templates/portage/make.conf.erb +30 -0
- data/templates/portage/package.use/bindist +3 -0
- data/templates/portage/package.use/documentation +3 -0
- data/templates/services/memcached/memcached.erb +40 -0
- data/templates/services/mysql/my.cnf.erb +143 -0
- data/templates/services/mysql/root_my.cnf.erb +11 -0
- data/templates/services/mysql/user_db_grants.sql.erb +33 -0
- data/templates/services/mysql/user_db_grants.sql.erb_cleanupUsers +52 -0
- data/templates/services/nginx/nginx.conf.erb +48 -0
- data/templates/services/php/php-fpm.conf.erb +2 -0
- data/templates/services/postfix/localmail.initial_setup.sh +19 -0
- data/templates/services/postfix/localmail.main.cf.erb +41 -0
- data/templates/services/postfix/mailname.erb +1 -0
- data/templates/services/postfix/mailrelayhost_main.cf.erb +33 -0
- data/templates/services/postfix/main.cf.erb +28 -0
- data/templates/services/postfix/master.cf.erb +124 -0
- data/templates/services/postfix/mysql-virtual-alias-maps.cf.erb +5 -0
- data/templates/services/postfix/mysql-virtual-mailbox-domains.cf.erb +5 -0
- data/templates/services/postfix/mysql-virtual-mailbox-maps.cf.erb +5 -0
- data/templates/system/authorized_keys.erb +5 -0
- data/templates/system/crontab.erb +8 -0
- data/templates/system/dmcrypt.erb +17 -0
- data/templates/system/exports.erb +4 -0
- data/templates/system/fstab.erb +4 -0
- data/templates/system/sudoers.erb +5 -0
- metadata +44 -11
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- /data/bin/{setup → setup-dd} +0 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
smtpd_banner = $myhostname ESMTP $mail_name
|
2
|
+
biff = no
|
3
|
+
|
4
|
+
# TLS parameters
|
5
|
+
smtpd_use_tls = <%= @variables[:use_tls] %>
|
6
|
+
smtpd_tls_auth_only = <%= @variables[:use_tls] %>
|
7
|
+
smtpd_tls_cert_file = <%= @variables[:ssl_cert] %>
|
8
|
+
smtpd_tls_key_file = <%= @variables[:ssl_key] %>
|
9
|
+
smtpd_tls_CAfile = <%= @variables[:ssl_cacert] %>
|
10
|
+
|
11
|
+
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
|
12
|
+
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
13
|
+
|
14
|
+
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
|
15
|
+
# information on enabling SSL in the smtp client.
|
16
|
+
|
17
|
+
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
|
18
|
+
myhostname = <%= @variables[:hostname] %>
|
19
|
+
alias_maps = hash:/etc/aliases
|
20
|
+
alias_database = hash:/etc/aliases
|
21
|
+
myorigin = /etc/mailname
|
22
|
+
mydestination = <%= @variables[:hostname] %>, localhost
|
23
|
+
relayhost = <%= @variables[:relayhost] %>
|
24
|
+
mynetworks = <%= @variables[:mynetworks] %> 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
|
25
|
+
mailbox_size_limit = 0
|
26
|
+
recipient_delimiter = +
|
27
|
+
inet_interfaces = all
|
28
|
+
inet_protocols = ipv4
|
@@ -0,0 +1,124 @@
|
|
1
|
+
#
|
2
|
+
# Postfix master process configuration file. For details on the format
|
3
|
+
# of the file, see the master(5) manual page (command: "man 5 master" or
|
4
|
+
# on-line: http://www.postfix.org/master.5.html).
|
5
|
+
#
|
6
|
+
# Do not forget to execute "postfix reload" after editing this file.
|
7
|
+
#
|
8
|
+
# ==========================================================================
|
9
|
+
# service type private unpriv chroot wakeup maxproc command + args
|
10
|
+
# (yes) (yes) (yes) (never) (100)
|
11
|
+
# ==========================================================================
|
12
|
+
smtp inet n - - - - smtpd
|
13
|
+
#smtp inet n - - - 1 postscreen
|
14
|
+
#smtpd pass - - - - - smtpd
|
15
|
+
#dnsblog unix - - - - 0 dnsblog
|
16
|
+
#tlsproxy unix - - - - 0 tlsproxy
|
17
|
+
submission inet n - - - - smtpd
|
18
|
+
-o syslog_name=postfix/submission
|
19
|
+
-o smtpd_tls_security_level=encrypt
|
20
|
+
# -o smtpd_sasl_auth_enable=yes
|
21
|
+
# -o smtpd_reject_unlisted_recipient=no
|
22
|
+
# -o smtpd_client_restrictions=$mua_client_restrictions
|
23
|
+
# -o smtpd_helo_restrictions=$mua_helo_restrictions
|
24
|
+
# -o smtpd_sender_restrictions=$mua_sender_restrictions
|
25
|
+
# -o smtpd_recipient_restrictions=
|
26
|
+
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
|
27
|
+
# -o milter_macro_daemon_name=ORIGINATING
|
28
|
+
smtps inet n - - - - smtpd
|
29
|
+
-o syslog_name=postfix/smtps
|
30
|
+
# -o smtpd_tls_wrappermode=yes
|
31
|
+
# -o smtpd_sasl_auth_enable=yes
|
32
|
+
# -o smtpd_reject_unlisted_recipient=no
|
33
|
+
# -o smtpd_client_restrictions=$mua_client_restrictions
|
34
|
+
# -o smtpd_helo_restrictions=$mua_helo_restrictions
|
35
|
+
# -o smtpd_sender_restrictions=$mua_sender_restrictions
|
36
|
+
# -o smtpd_recipient_restrictions=
|
37
|
+
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
|
38
|
+
# -o milter_macro_daemon_name=ORIGINATING
|
39
|
+
#628 inet n - - - - qmqpd
|
40
|
+
pickup unix n - - 60 1 pickup
|
41
|
+
cleanup unix n - - - 0 cleanup
|
42
|
+
qmgr unix n - n 300 1 qmgr
|
43
|
+
#qmgr unix n - n 300 1 oqmgr
|
44
|
+
tlsmgr unix - - - 1000? 1 tlsmgr
|
45
|
+
rewrite unix - - - - - trivial-rewrite
|
46
|
+
bounce unix - - - - 0 bounce
|
47
|
+
defer unix - - - - 0 bounce
|
48
|
+
trace unix - - - - 0 bounce
|
49
|
+
verify unix - - - - 1 verify
|
50
|
+
flush unix n - - 1000? 0 flush
|
51
|
+
proxymap unix - - n - - proxymap
|
52
|
+
proxywrite unix - - n - 1 proxymap
|
53
|
+
smtp unix - - - - - smtp
|
54
|
+
relay unix - - - - - smtp
|
55
|
+
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
|
56
|
+
showq unix n - - - - showq
|
57
|
+
error unix - - - - - error
|
58
|
+
retry unix - - - - - error
|
59
|
+
discard unix - - - - - discard
|
60
|
+
local unix - n n - - local
|
61
|
+
virtual unix - n n - - virtual
|
62
|
+
lmtp unix - - - - - lmtp
|
63
|
+
anvil unix - - - - 1 anvil
|
64
|
+
scache unix - - - - 1 scache
|
65
|
+
#
|
66
|
+
# ====================================================================
|
67
|
+
# Interfaces to non-Postfix software. Be sure to examine the manual
|
68
|
+
# pages of the non-Postfix software to find out what options it wants.
|
69
|
+
#
|
70
|
+
# Many of the following services use the Postfix pipe(8) delivery
|
71
|
+
# agent. See the pipe(8) man page for information about ${recipient}
|
72
|
+
# and other message envelope options.
|
73
|
+
# ====================================================================
|
74
|
+
#
|
75
|
+
# maildrop. See the Postfix MAILDROP_README file for details.
|
76
|
+
# Also specify in main.cf: maildrop_destination_recipient_limit=1
|
77
|
+
#
|
78
|
+
maildrop unix - n n - - pipe
|
79
|
+
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
|
80
|
+
#
|
81
|
+
# ====================================================================
|
82
|
+
#
|
83
|
+
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
|
84
|
+
#
|
85
|
+
# Specify in cyrus.conf:
|
86
|
+
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
|
87
|
+
#
|
88
|
+
# Specify in main.cf one or more of the following:
|
89
|
+
# mailbox_transport = lmtp:inet:localhost
|
90
|
+
# virtual_transport = lmtp:inet:localhost
|
91
|
+
#
|
92
|
+
# ====================================================================
|
93
|
+
#
|
94
|
+
# Cyrus 2.1.5 (Amos Gouaux)
|
95
|
+
# Also specify in main.cf: cyrus_destination_recipient_limit=1
|
96
|
+
#
|
97
|
+
#cyrus unix - n n - - pipe
|
98
|
+
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
|
99
|
+
#
|
100
|
+
# ====================================================================
|
101
|
+
# Old example of delivery via Cyrus.
|
102
|
+
#
|
103
|
+
#old-cyrus unix - n n - - pipe
|
104
|
+
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
|
105
|
+
#
|
106
|
+
# ====================================================================
|
107
|
+
#
|
108
|
+
# See the Postfix UUCP_README file for configuration details.
|
109
|
+
#
|
110
|
+
uucp unix - n n - - pipe
|
111
|
+
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
|
112
|
+
#
|
113
|
+
# Other external delivery methods.
|
114
|
+
#
|
115
|
+
ifmail unix - n n - - pipe
|
116
|
+
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
|
117
|
+
bsmtp unix - n n - - pipe
|
118
|
+
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
|
119
|
+
scalemail-backend unix - n n - 2 pipe
|
120
|
+
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
|
121
|
+
mailman unix - n n - - pipe
|
122
|
+
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
|
123
|
+
${nexthop} ${user}
|
124
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# DanarchyDeploy crontab
|
2
|
+
SHELL=<%= @variables[:shell] || '/bin/bash' %>
|
3
|
+
PATH=<%= @variables[:path] || '/bin:/usr/bin' %>
|
4
|
+
BASH_ENV=<%= @variables[:env] || '~/.bashrc' %>
|
5
|
+
|
6
|
+
<% @variables[:jobs].each do |job| -%>
|
7
|
+
<%= "#{job[:schedule]}\t#{job[:command]}" %>
|
8
|
+
<% end -%>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# DanarchyDeploy dmcrypt
|
2
|
+
# How long to wait for each timeout (in seconds).
|
3
|
+
dmcrypt_key_timeout=1
|
4
|
+
|
5
|
+
# Max number of checks to perform (see dmcrypt_key_timeout).
|
6
|
+
#dmcrypt_max_timeout=300
|
7
|
+
|
8
|
+
# Number of password retries.
|
9
|
+
dmcrypt_retries=2
|
10
|
+
|
11
|
+
<% @variables.each do |device, volume| -%>
|
12
|
+
<%= "# Encrypted volume name|volgroup|device: #{device}" %>
|
13
|
+
<% volume[:variables].each do |key, value| -%>
|
14
|
+
<%= key -%>=<%= value %>
|
15
|
+
<% end -%>
|
16
|
+
<%# intentionally left blank %>
|
17
|
+
<% end -%>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danarchy_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan James
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danarchy_couchdb
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
61
|
+
version: '2.20'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '2.
|
68
|
+
version: '2.20'
|
69
69
|
description: DanarchyDeploy intends to simplify Gentoo Linux (and other distro) deployments
|
70
70
|
down to a single template from an input JSON or YAML file, or from a CouchDB file.
|
71
71
|
email:
|
@@ -73,14 +73,14 @@ email:
|
|
73
73
|
executables:
|
74
74
|
- console-dd
|
75
75
|
- danarchy_deploy
|
76
|
-
- setup
|
76
|
+
- setup-dd
|
77
77
|
extensions: []
|
78
78
|
extra_rdoc_files: []
|
79
79
|
files:
|
80
|
+
- ".asdf_versions.json"
|
80
81
|
- ".gitignore"
|
81
82
|
- ".rspec"
|
82
|
-
- ".
|
83
|
-
- ".ruby-version"
|
83
|
+
- ".tool-versions"
|
84
84
|
- ".travis.yml"
|
85
85
|
- CHANGELOG.md
|
86
86
|
- Gemfile
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
- Rakefile
|
91
91
|
- bin/console-dd
|
92
92
|
- bin/danarchy_deploy
|
93
|
-
- bin/setup
|
93
|
+
- bin/setup-dd
|
94
94
|
- danarchy_deploy.gemspec
|
95
95
|
- lib/danarchy_deploy.rb
|
96
96
|
- lib/danarchy_deploy/applicator.rb
|
@@ -126,7 +126,40 @@ files:
|
|
126
126
|
- lib/danarchy_deploy/templater.rb
|
127
127
|
- lib/danarchy_deploy/users.rb
|
128
128
|
- lib/danarchy_deploy/version.rb
|
129
|
+
- templates/applications/nginx/domain.conf.erb
|
130
|
+
- templates/applications/php/phpfpm.conf.erb
|
131
|
+
- templates/applications/php/user.conf.erb
|
132
|
+
- templates/applications/wordpress/mysql_user_privileges.sql.erb
|
133
|
+
- templates/applications/wordpress/wp-config.php.erb
|
134
|
+
- templates/asdf/asdf.sh.erb
|
129
135
|
- templates/deploy_template.json
|
136
|
+
- templates/distcc/distccd.erb
|
137
|
+
- templates/distcc/hosts.erb
|
138
|
+
- templates/portage/make.conf.erb
|
139
|
+
- templates/portage/package.use/bindist
|
140
|
+
- templates/portage/package.use/documentation
|
141
|
+
- templates/services/memcached/memcached.erb
|
142
|
+
- templates/services/mysql/my.cnf.erb
|
143
|
+
- templates/services/mysql/root_my.cnf.erb
|
144
|
+
- templates/services/mysql/user_db_grants.sql.erb
|
145
|
+
- templates/services/mysql/user_db_grants.sql.erb_cleanupUsers
|
146
|
+
- templates/services/nginx/nginx.conf.erb
|
147
|
+
- templates/services/php/php-fpm.conf.erb
|
148
|
+
- templates/services/postfix/localmail.initial_setup.sh
|
149
|
+
- templates/services/postfix/localmail.main.cf.erb
|
150
|
+
- templates/services/postfix/mailname.erb
|
151
|
+
- templates/services/postfix/mailrelayhost_main.cf.erb
|
152
|
+
- templates/services/postfix/main.cf.erb
|
153
|
+
- templates/services/postfix/master.cf.erb
|
154
|
+
- templates/services/postfix/mysql-virtual-alias-maps.cf.erb
|
155
|
+
- templates/services/postfix/mysql-virtual-mailbox-domains.cf.erb
|
156
|
+
- templates/services/postfix/mysql-virtual-mailbox-maps.cf.erb
|
157
|
+
- templates/system/authorized_keys.erb
|
158
|
+
- templates/system/crontab.erb
|
159
|
+
- templates/system/dmcrypt.erb
|
160
|
+
- templates/system/exports.erb
|
161
|
+
- templates/system/fstab.erb
|
162
|
+
- templates/system/sudoers.erb
|
130
163
|
homepage: https://github.com/danarchy85/danarchy_deploy
|
131
164
|
licenses:
|
132
165
|
- MIT
|
@@ -147,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
180
|
- !ruby/object:Gem::Version
|
148
181
|
version: '0'
|
149
182
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.5.11
|
151
184
|
signing_key:
|
152
185
|
specification_version: 4
|
153
186
|
summary: Pushes deployments locally or remotely based on a JSON/YAML/CouchDB template.
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
danarchy_deploy
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.7.2
|
/data/bin/{setup → setup-dd}
RENAMED
File without changes
|