ConfigLMM 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +63 -1
  3. data/Examples/Implemented.mm.yaml +120 -0
  4. data/Examples/Keys.ini +2 -0
  5. data/Examples/Linux.mm.yaml +14 -3
  6. data/Images/configINconfig.png +0 -0
  7. data/Images/singleConfig.png +0 -0
  8. data/Plugins/Apps/Authentik/Authentik-Server.container +18 -0
  9. data/Plugins/Apps/Authentik/Authentik-Worker.container +17 -0
  10. data/Plugins/Apps/Authentik/Authentik.conf.erb +35 -0
  11. data/Plugins/Apps/Authentik/Authentik.lmm.rb +73 -0
  12. data/Plugins/Apps/Cassandra/Cassandra.lmm.rb +41 -0
  13. data/Plugins/Apps/Dovecot/Dovecot.lmm.rb +165 -0
  14. data/Plugins/Apps/GitLab/GitLab.conf.erb +26 -0
  15. data/Plugins/Apps/GitLab/GitLab.container +17 -0
  16. data/Plugins/Apps/GitLab/GitLab.lmm.rb +75 -0
  17. data/Plugins/Apps/Nextcloud/Nextcloud.conf.erb +48 -10
  18. data/Plugins/Apps/Nextcloud/Nextcloud.lmm.rb +59 -2
  19. data/Plugins/Apps/Nextcloud/config.php +18 -0
  20. data/Plugins/Apps/Nginx/conf.d/configlmm.conf +62 -0
  21. data/Plugins/Apps/Nginx/config-lmm/errors.conf +2 -2
  22. data/Plugins/Apps/Nginx/config-lmm/security.conf +4 -0
  23. data/Plugins/Apps/Nginx/main.conf.erb +31 -0
  24. data/Plugins/Apps/Nginx/nginx.conf +3 -68
  25. data/Plugins/Apps/Nginx/nginx.lmm.rb +71 -14
  26. data/Plugins/Apps/Odoo/Odoo.conf.erb +30 -13
  27. data/Plugins/Apps/Odoo/Odoo.container +17 -0
  28. data/Plugins/Apps/Odoo/Odoo.lmm.rb +62 -2
  29. data/Plugins/Apps/Odoo/odoo.conf +37 -0
  30. data/Plugins/Apps/PHP-FPM/PHP-FPM.lmm.rb +95 -0
  31. data/Plugins/Apps/Peppermint/Peppermint.conf.erb +64 -0
  32. data/Plugins/Apps/Peppermint/Peppermint.container +14 -0
  33. data/Plugins/Apps/Peppermint/Peppermint.lmm.rb +58 -0
  34. data/Plugins/Apps/Postfix/Postfix.lmm.rb +184 -0
  35. data/Plugins/Apps/Postfix/smtpd.conf +3 -0
  36. data/Plugins/Apps/PostgreSQL/PostgreSQL.lmm.rb +225 -0
  37. data/Plugins/Apps/SSH/SSH.lmm.rb +51 -0
  38. data/Plugins/Apps/UVdesk/UVdesk.conf.erb +52 -0
  39. data/Plugins/Apps/UVdesk/UVdesk.lmm.rb +85 -0
  40. data/Plugins/Apps/Valkey/Valkey.lmm.rb +56 -0
  41. data/Plugins/Apps/Vaultwarden/Vaultwarden.conf.erb +35 -18
  42. data/Plugins/Apps/Vaultwarden/Vaultwarden.container +16 -0
  43. data/Plugins/Apps/Vaultwarden/Vaultwarden.lmm.rb +42 -3
  44. data/Plugins/Apps/gollum/gollum.conf.erb +45 -18
  45. data/Plugins/Apps/gollum/gollum.container +12 -0
  46. data/Plugins/Apps/gollum/gollum.lmm.rb +39 -10
  47. data/Plugins/OS/Linux/Distributions.yaml +16 -0
  48. data/Plugins/OS/Linux/Linux.lmm.rb +389 -0
  49. data/Plugins/OS/Linux/Packages.yaml +51 -0
  50. data/Plugins/OS/Linux/WireGuard/WireGuard.lmm.rb +108 -0
  51. data/Plugins/OS/Linux/WireGuard/wg0.conf.erb +15 -0
  52. data/Plugins/OS/Linux/openSUSE/autoinst.xml.erb +87 -0
  53. data/Plugins/OS/Linux/systemd/systemd.lmm.rb +28 -0
  54. data/Plugins/OS/Linux/systemd/user-0.slice +9 -0
  55. data/Plugins/OS/Linux/systemd/user@.service.d/delegate.conf +3 -0
  56. data/Plugins/Platforms/GoDaddy/GoDaddy.lmm.rb +6 -1
  57. data/Plugins/Platforms/libvirt/libvirt.lmm.rb +103 -0
  58. data/Plugins/Services/DNS/PowerDNS.lmm.rb +69 -6
  59. data/README.md +10 -0
  60. data/bootstrap.sh +54 -0
  61. data/lib/ConfigLMM/Framework/plugins/dns.rb +1 -2
  62. data/lib/ConfigLMM/Framework/plugins/linuxApp.rb +237 -0
  63. data/lib/ConfigLMM/Framework/plugins/nginxApp.rb +24 -6
  64. data/lib/ConfigLMM/Framework/plugins/plugin.rb +150 -0
  65. data/lib/ConfigLMM/Framework/plugins.rb +1 -0
  66. data/lib/ConfigLMM/commands/configsCommand.rb +3 -0
  67. data/lib/ConfigLMM/version.rb +1 -1
  68. metadata +87 -5
  69. data/Plugins/Apps/Nginx/main.conf +0 -30
  70. data/Plugins/OS/Linux.lmm.rb +0 -64
@@ -1,30 +0,0 @@
1
-
2
- server {
3
- listen 80;
4
- listen [::]:80;
5
- server_name _;
6
-
7
- include config-lmm/errors.conf;
8
-
9
- deny all;
10
- }
11
-
12
- server {
13
- listen 443 ssl reuseport;
14
- listen [::]:443 ssl reuseport;
15
- http2 on;
16
-
17
- server_name _;
18
-
19
- deny all;
20
-
21
- ssl_early_data on;
22
-
23
- ssl_certificate "/etc/letsencrypt/live/<%= certName %>/fullchain.pem";
24
- ssl_certificate_key "/etc/letsencrypt/live/<%= certName %>/privkey.pem";
25
- ssl_trusted_certificate "/etc/letsencrypt/live/<%= certName %>/chain.pem";
26
-
27
- include config-lmm/errors.conf;
28
- include config-lmm/security.conf;
29
- include config-lmm/ssl.conf;
30
- }
@@ -1,64 +0,0 @@
1
-
2
- module ConfigLMM
3
- module LMM
4
- class Linux < Framework::Plugin
5
-
6
- HOSTS_FILE = '/etc/hosts'
7
- HOSTS_SECTION_BEGIN = "# -----BEGIN CONFIGLMM-----\n"
8
- HOSTS_SECTION_END = "# -----END CONFIGLMM-----\n"
9
-
10
- def actionLinuxBuild(id, target, activeState, context, options)
11
- if target['Hosts']
12
- hosts = "#\n"
13
- hosts += "# /etc/hosts: static lookup table for host names\n"
14
- hosts += "#\n\n"
15
- hosts += "#<ip-address> <hostname.domain.org> <hostname>\n"
16
- hosts += "127.0.0.1 localhost\n"
17
- hosts += "::1 localhost\n\n"
18
- hosts += HOSTS_SECTION_BEGIN
19
- target['Hosts'].each do |ip, entries|
20
- hosts += ip.ljust(16) + entries.join(' ') + "\n"
21
- end
22
- hosts += HOSTS_SECTION_END
23
-
24
- mkdir(options['output'] + '/etc', options[:dry])
25
- fileWrite(options['output'] + HOSTS_FILE, hosts, options[:dry])
26
- end
27
- end
28
-
29
- def actionLinuxDeploy(id, target, activeState, context, options)
30
- if !target['Location'] || target['Location'] == '@me'
31
- if target['Hosts']
32
- hostsLines = File.read(HOSTS_FILE).lines
33
- sectionBeginIndex = hostsLines.index(HOSTS_SECTION_BEGIN)
34
- sectionEndIndex = hostsLines.index(HOSTS_SECTION_END)
35
- if sectionBeginIndex.nil?
36
- linesBefore = hostsLines
37
- linesBefore << "\n"
38
- linesBefore << HOSTS_SECTION_BEGIN
39
- linesAfter = [HOSTS_SECTION_END]
40
- linesAfter << "\n"
41
- else
42
- linesBefore = hostsLines[0..sectionBeginIndex]
43
- if sectionEndIndex.nil?
44
- linesAfter = [HOSTS_SECTION_END]
45
- linesAfter << "\n"
46
- else
47
- linesAfter = hostsLines[sectionEndIndex..hostsLines.length]
48
- end
49
- end
50
-
51
- hostsLines = linesBefore
52
- target['Hosts'].each do |ip, entries|
53
- hostsLines << ip.ljust(16) + entries.join(' ') + "\n"
54
- end
55
- hostsLines += linesAfter
56
-
57
- fileWrite(HOSTS_FILE, hostsLines.join(), options[:dry])
58
- end
59
- end
60
- end
61
-
62
- end
63
- end
64
- end