salted-rails 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +48 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +20 -0
  5. data/README.md +79 -0
  6. data/Rakefile +1 -0
  7. data/lib/salted_rails.rb +5 -0
  8. data/lib/salted_rails/base.rb +5 -0
  9. data/lib/salted_rails/capistrano.rb +6 -0
  10. data/lib/salted_rails/vagrant_helper.rb +155 -0
  11. data/lib/salted_rails/version.rb +3 -0
  12. data/pillar/capistrano.sls +3 -0
  13. data/pillar/capistrano/top.sls +5 -0
  14. data/pillar/common.sls +15 -0
  15. data/pillar/vagrant.sls +3 -0
  16. data/pillar/vagrant/top.sls +5 -0
  17. data/salt/apt/partner-sources.sls +13 -0
  18. data/salt/apt/unwanted.sls +5 -0
  19. data/salt/capistrano.sls +0 -0
  20. data/salt/capistrano/minion +14 -0
  21. data/salt/capistrano/minion.sls +6 -0
  22. data/salt/capistrano/top.sls +8 -0
  23. data/salt/common.sls +19 -0
  24. data/salt/crons/init.sls +23 -0
  25. data/salt/databases/mysql/client-encoding-and-collation.cnf +2 -0
  26. data/salt/databases/mysql/client.sls +17 -0
  27. data/salt/databases/mysql/common.sls +22 -0
  28. data/salt/databases/mysql/config.sls +6 -0
  29. data/salt/databases/mysql/custom_config.sls +14 -0
  30. data/salt/databases/mysql/default-table-engine.cnf +2 -0
  31. data/salt/databases/mysql/group.sls +4 -0
  32. data/salt/databases/mysql/init.sls +8 -0
  33. data/salt/databases/mysql/server-encoding-and-collation.cnf +4 -0
  34. data/salt/databases/mysql/server.sls +59 -0
  35. data/salt/databases/phpmyadmin/etc/nginx/sites-available/.gitignore +3 -0
  36. data/salt/databases/phpmyadmin/etc/nginx/sites-available/phpmyadmin.conf +24 -0
  37. data/salt/databases/phpmyadmin/init.sls +27 -0
  38. data/salt/develop/init.sls +3 -0
  39. data/salt/echo_pillar.sls +9 -0
  40. data/salt/editors/vim/init.sls +12 -0
  41. data/salt/editors/vim/vimrc +23 -0
  42. data/salt/lang/php/composer.sls +9 -0
  43. data/salt/lang/php/etc/php5/fpm/php.fpm.ini +1818 -0
  44. data/salt/lang/php/etc/php5/fpm/pool.d/www.conf +393 -0
  45. data/salt/lang/php/init.sls +38 -0
  46. data/salt/lang/php/nginx.sls +9 -0
  47. data/salt/lang/python/python-libs.sls +28 -0
  48. data/salt/lang/ruby.sls +60 -0
  49. data/salt/lang/ruby.sls.bak +106 -0
  50. data/salt/lang/system_ruby.sls +43 -0
  51. data/salt/munin/files/nginx/plugin-conf.d/nginx +2 -0
  52. data/salt/munin/files/nginx/plugins/nginx_combined_localhost +160 -0
  53. data/salt/munin/files/nginx/plugins/nginx_request +114 -0
  54. data/salt/munin/files/nginx/plugins/nginx_status +126 -0
  55. data/salt/munin/files/node/checkPermissions.sh +10 -0
  56. data/salt/munin/files/node/munin-node.conf +54 -0
  57. data/salt/munin/files/php5-fpm/plugins/phpfpm_average +39 -0
  58. data/salt/munin/files/php5-fpm/plugins/phpfpm_connections +71 -0
  59. data/salt/munin/files/php5-fpm/plugins/phpfpm_memory +24 -0
  60. data/salt/munin/files/php5-fpm/plugins/phpfpm_processes +38 -0
  61. data/salt/munin/files/php5-fpm/plugins/phpfpm_status +83 -0
  62. data/salt/munin/files/server/munin.conf +107 -0
  63. data/salt/munin/nginx.sls +13 -0
  64. data/salt/munin/node.sls +34 -0
  65. data/salt/munin/php5-fpm.sls +13 -0
  66. data/salt/munin/server.sls +7 -0
  67. data/salt/railsapp/database.sls +25 -0
  68. data/salt/railsapp/files/Gemfile +57 -0
  69. data/salt/railsapp/files/Gemfile.lock +133 -0
  70. data/salt/railsapp/gems.sls +18 -0
  71. data/salt/railsapp/init.sls +3 -0
  72. data/salt/run-standalone +3 -0
  73. data/salt/salt/minion/config.template +259 -0
  74. data/salt/salt/minion/debconf.sls +3 -0
  75. data/salt/salt/minion/init.sls +49 -0
  76. data/salt/salt/minion/lsb.sls +8 -0
  77. data/salt/salt/minion/mysql.conf +1 -0
  78. data/salt/salt/minion/mysql.sls +20 -0
  79. data/salt/server/monit.sls +31 -0
  80. data/salt/server/sudo/init.sls +16 -0
  81. data/salt/server/sudo/sudoers +90 -0
  82. data/salt/sysutils/file.sls +8 -0
  83. data/salt/sysutils/init.sls +5 -0
  84. data/salt/sysutils/net.sls +9 -0
  85. data/salt/sysutils/status.sls +11 -0
  86. data/salt/sysutils/tmux.sls +3 -0
  87. data/salt/vagrant.sls +0 -0
  88. data/salt/vagrant/minion +14 -0
  89. data/salt/vagrant/minion.sls +6 -0
  90. data/salt/vagrant/top.sls +8 -0
  91. data/salt/www/chromium.sls +6 -0
  92. data/salt/www/nginx/etc/nginx/nginx.conf +53 -0
  93. data/salt/www/nginx/init.sls +20 -0
  94. data/salt/www/users.sls +12 -0
  95. data/salted-rails.gemspec +23 -0
  96. metadata +163 -0
@@ -0,0 +1,107 @@
1
+ # Example configuration file for Munin, generated by 'make build'
2
+
3
+ # The next three variables specifies where the location of the RRD
4
+ # databases, the HTML output, logs and the lock/pid files. They all
5
+ # must be writable by the user running munin-cron. They are all
6
+ # defaulted to the values you see here.
7
+ #
8
+ dbdir /var/lib/munin
9
+ htmldir /var/cache/munin/www
10
+ logdir /var/log/munin
11
+ rundir /var/run/munin
12
+ #
13
+ # Where to look for the HTML templates
14
+ tmpldir /etc/munin/templates
15
+
16
+ graph_width 500
17
+ #graph_height 600
18
+
19
+ # (Exactly one) directory to include all files from.
20
+ #
21
+ includedir /etc/munin/munin-conf.d
22
+
23
+
24
+ # Make graphs show values per minute instead of per second
25
+ #graph_period minute
26
+
27
+ # Graphics files are normaly generated by munin-graph, no matter if
28
+ # the graphs are used or not. You can change this to
29
+ # on-demand-graphing by following the instructions in
30
+ # http://munin.projects.linpro.no/wiki/CgiHowto
31
+ #
32
+ #graph_strategy cgi
33
+
34
+ # munin-cgi-graph is invoked by the web server up to very many times at the
35
+ # same time. This is not optimal since it results in high CPU and memory
36
+ # consumption to the degree that the system can thrash. Again the default is
37
+ # 6. Most likely the optimal number for max_cgi_graph_jobs is the same as
38
+ # max_graph_jobs.
39
+ #
40
+ #munin_cgi_graph_jobs 6
41
+
42
+ # If the automatic CGI url is wrong for your system override it here:
43
+ #
44
+ #cgiurl_graph /cgi-bin/munin-cgi-graph
45
+
46
+ # munin-graph runs in parallel, the number of concurrent processes is
47
+ # 6. If you want munin-graph to not be parallel set to 0. If set too
48
+ # high it will slow down munin-graph. Some experiments are needed to
49
+ # determine how many are optimal on your system. On a multi-core
50
+ # system with good SCSI disks the number can probably be quite high.
51
+ #
52
+ #max_graph_jobs 6
53
+
54
+ # Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
55
+ # something changes (OK -> WARNING, CRITICAL -> OK, etc)
56
+ #contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
57
+ #contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
58
+ #
59
+ # For those with Nagios, the following might come in handy. In addition,
60
+ # the services must be defined in the Nagios server as well.
61
+ #contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
62
+
63
+ # a simple host tree
64
+ [localhost]
65
+ address 127.0.0.1
66
+ use_node_name yes
67
+
68
+ #
69
+ # A more complex example of a host tree
70
+ #
71
+ ## First our "normal" host.
72
+ # [fii.foo.com]
73
+ # address foo
74
+ #
75
+ ## Then our other host...
76
+ # [fay.foo.com]
77
+ # address fay
78
+ #
79
+ ## Then we want totals...
80
+ # [foo.com;Totals] #Force it into the "foo.com"-domain...
81
+ # update no # Turn off data-fetching for this "host".
82
+ #
83
+ # # The graph "load1". We want to see the loads of both machines...
84
+ # # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
85
+ # load1.graph_title Loads side by side
86
+ # load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
87
+ #
88
+ # # The graph "load2". Now we want them stacked on top of each other.
89
+ # load2.graph_title Loads on top of each other
90
+ # load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
91
+ # load2.dummy_field.draw AREA # We want area instead the default LINE2.
92
+ # load2.dummy_field.label dummy # This is needed. Silly, really.
93
+ #
94
+ # # The graph "load3". Now we want them summarised into one field
95
+ # load3.graph_title Loads summarised
96
+ # load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
97
+ # load3.combined_loads.label Combined loads # Must be set, as this is
98
+ # # not a dummy field!
99
+ #
100
+ ## ...and on a side note, I want them listen in another order (default is
101
+ ## alphabetically)
102
+ #
103
+ # # Since [foo.com] would be interpreted as a host in the domain "com", we
104
+ # # specify that this is a domain by adding a semicolon.
105
+ # [foo.com;]
106
+ # node_order Totals fii.foo.com fay.foo.com
107
+ #
@@ -0,0 +1,13 @@
1
+ munin-nginx-plugins:
2
+ file:
3
+ - recurse
4
+ - source: salt://munin/files/nginx/plugins
5
+ - name: /etc/munin/plugins
6
+ - mode: 755
7
+
8
+ munin-nginx-plugin-conf:
9
+ file:
10
+ - recurse
11
+ - source: salt://munin/files/nginx/plugin-conf.d
12
+ - name: /etc/munin/plugin-conf.d
13
+ - mode: 755
@@ -0,0 +1,34 @@
1
+ # Example Configurations for Munin Node
2
+ # Originally for Ubuntu 10.04, package
3
+ # name may be different for your dist
4
+
5
+ munin-node:
6
+ pkg:
7
+ - installed
8
+ service:
9
+ - running
10
+ - watch:
11
+ - file: core-munin-conf
12
+ - pkg: munin-node-dependancies
13
+
14
+ # Dependancies for Several Custom Munin Plugins
15
+ munin-node-dependancies:
16
+ pkg:
17
+ - installed
18
+ - names:
19
+ - libwww-perl
20
+
21
+ # Configuration Files & Scripts
22
+ munin-node-conf:
23
+ file:
24
+ - recurse
25
+ - source: salt://munin/files/node
26
+ - name: /etc/munin
27
+
28
+ # Check Permissions of Plugins to Ensure They Are Executible
29
+ chmod -R 755 /etc/munin/plugins/:
30
+ cmd:
31
+ - run
32
+ - unless: bash /etc/munin/checkPermissions.sh
33
+ - require:
34
+ - file: core-munin-conf
@@ -0,0 +1,13 @@
1
+ munin-php5-fpm-plugins:
2
+ file:
3
+ - recurse
4
+ - source: salt://munin/files/php5-fpm/plugins
5
+ - name: /etc/munin/plugins
6
+ - mode: 755
7
+
8
+ munin-php5-fpm-plugin-conf:
9
+ file:
10
+ - recurse
11
+ - source: salt://munin/files/php5-fpm/plugin-conf.d
12
+ - name: /etc/munin/plugin-conf.d
13
+ - mode: 755
@@ -0,0 +1,7 @@
1
+ # Example Configurations for Munin Server
2
+ # Originally for Ubuntu 10.04, package
3
+ # name may be different for your dist
4
+
5
+ munin:
6
+ pkg:
7
+ - installed
@@ -0,0 +1,25 @@
1
+ include:
2
+ - databases.mysql.server
3
+
4
+ database:
5
+ mysql_database.present:
6
+ - names:
7
+ - {{ pillar['database']['development']['database'] }}
8
+ - {{ pillar['database']['test']['database'] }}
9
+ - require:
10
+ - service.running: mysql-server
11
+ - pkg: mysql-server
12
+ mysql_user:
13
+ - present
14
+ - name: {{ pillar['database']['development']['username'] }}
15
+ - password: {{ pillar['database']['development']['password'] }}
16
+ - require:
17
+ - mysql_database.present: database
18
+ mysql_grants.present:
19
+ - database: {{ pillar['database']['development']['username'] }}_%.*
20
+ - grant: ALL PRIVILEGES
21
+ - user: {{ pillar['database']['development']['username'] }}
22
+ - host: localhost
23
+ - require:
24
+ - mysql_user.present: database
25
+
@@ -0,0 +1,57 @@
1
+ # Either run vagrant or manually link Gemfile* to salt/salt/railsapps/files/ when Gemfile is changed
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rails', '1.2.6'
6
+
7
+ gem 'image_science', '1.2.4'
8
+ # drags in RubyInLIne which drags in ZenTest, which has a gemsepc in 4.3.4 that breaks in all but the most current rubygems (author refuses to fix)
9
+ gem 'ZenTest', '4.3.3' # '~> 4.3'
10
+
11
+ # also in environment.rb because of passenger preloading
12
+ gem 'mysql', '2.8.1'
13
+
14
+ gem 'json', '~> 1.5.5'
15
+
16
+ gem 'rake', '~> 0.9'
17
+
18
+ gem 'rdoc'
19
+
20
+ gem 'rdoc-data'
21
+ # then rdoc-data --install
22
+
23
+ group :development do
24
+ gem 'bullet', '1.7.6'
25
+ gem 'capistrano', '2.11.2'
26
+ gem 'cgi_multipart_eof_fix', '2.5.0'
27
+ gem 'daemon_controller', '1.0.0'
28
+ gem 'diff-lcs', '1.1.3'
29
+ gem 'fastthread', '1.0.7'
30
+ gem 'gem_plugin', '0.2.3'
31
+ gem 'highline', '1.6.11'
32
+ gem 'hoe', '2.14.0'
33
+ gem 'linecache', '0.46'
34
+ gem 'mongrel', '1.1.5'
35
+ gem 'needle', '1.3.0'
36
+ gem 'net-scp', '1.0.4'
37
+ gem 'net-sftp', '2.0.5'
38
+ gem 'net-ssh', '2.3.0'
39
+ gem 'net-ssh-gateway', '1.1.0'
40
+ gem 'passenger', '3.0.11'
41
+ gem 'production_log_analyzer', '1.5.1'
42
+ gem 'rack', '1.2.4'
43
+ gem 'rails_analyzer_tools', '1.4.0'
44
+ gem 'rbx-require-relative', '0.0.9'
45
+ gem 'ruby-debug-base', '0.10.4'
46
+ gem 'ruby-debug-ide', '0.4.9'
47
+ gem 'rubyforge', '0.4.5'
48
+ gem 'SyslogLogger', '1.4.0'
49
+ end
50
+
51
+ group :test do
52
+ gem 'rcov', '0.9.11'
53
+ gem 'rspec', '1.1.12'
54
+ gem 'syntax' # syntax highlighting on rspec output
55
+ gem 'launchy', '>= 2.0.0' # opsys independent launch browser
56
+ gem 'rspec-rails', '1.1.12'
57
+ end
@@ -0,0 +1,133 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ RubyInline (3.12.1)
5
+ ZenTest (~> 4.3)
6
+ SyslogLogger (1.4.0)
7
+ hoe (>= 1.2.0)
8
+ ZenTest (4.3.3)
9
+ actionmailer (1.3.6)
10
+ actionpack (= 1.13.6)
11
+ actionpack (1.13.6)
12
+ activesupport (= 1.4.4)
13
+ actionwebservice (1.2.6)
14
+ actionpack (= 1.13.6)
15
+ activerecord (= 1.15.6)
16
+ activerecord (1.15.6)
17
+ activesupport (= 1.4.4)
18
+ activesupport (1.4.4)
19
+ addressable (2.3.3)
20
+ bullet (1.7.6)
21
+ capistrano (2.11.2)
22
+ highline
23
+ net-scp (>= 1.0.0)
24
+ net-sftp (>= 2.0.0)
25
+ net-ssh (>= 2.0.14)
26
+ net-ssh-gateway (>= 1.1.0)
27
+ cgi_multipart_eof_fix (2.5.0)
28
+ daemon_controller (1.0.0)
29
+ daemons (1.1.9)
30
+ diff-lcs (1.1.3)
31
+ fastthread (1.0.7)
32
+ gem_plugin (0.2.3)
33
+ highline (1.6.11)
34
+ hoe (2.14.0)
35
+ rake (~> 0.8)
36
+ image_science (1.2.4)
37
+ RubyInline (~> 3.9)
38
+ json (1.5.5)
39
+ launchy (2.2.0)
40
+ addressable (~> 2.3)
41
+ linecache (0.46)
42
+ rbx-require-relative (> 0.0.4)
43
+ mongrel (1.1.5)
44
+ cgi_multipart_eof_fix (>= 2.4)
45
+ daemons (>= 1.0.3)
46
+ fastthread (>= 1.0.1)
47
+ gem_plugin (>= 0.2.3)
48
+ mysql (2.8.1)
49
+ needle (1.3.0)
50
+ net-scp (1.0.4)
51
+ net-ssh (>= 1.99.1)
52
+ net-sftp (2.0.5)
53
+ net-ssh (>= 2.0.9)
54
+ net-ssh (2.3.0)
55
+ net-ssh-gateway (1.1.0)
56
+ net-ssh (>= 1.99.1)
57
+ passenger (3.0.11)
58
+ daemon_controller (>= 0.2.5)
59
+ fastthread (>= 1.0.1)
60
+ rack
61
+ rake (>= 0.8.1)
62
+ production_log_analyzer (1.5.1)
63
+ rails_analyzer_tools (>= 1.4.0)
64
+ rack (1.2.4)
65
+ rails (1.2.6)
66
+ actionmailer (= 1.3.6)
67
+ actionpack (= 1.13.6)
68
+ actionwebservice (= 1.2.6)
69
+ activerecord (= 1.15.6)
70
+ activesupport (= 1.4.4)
71
+ rake (>= 0.7.2)
72
+ rails_analyzer_tools (1.4.0)
73
+ SyslogLogger (>= 1.4.0)
74
+ hoe (>= 1.2.0)
75
+ rake (0.9.6)
76
+ rbx-require-relative (0.0.9)
77
+ rcov (0.9.11)
78
+ rdoc (3.12.2)
79
+ json (~> 1.4)
80
+ rdoc-data (3.12)
81
+ rdoc (> 2.5, < 4.0)
82
+ rspec (1.1.12)
83
+ rspec-rails (1.1.12)
84
+ rspec (= 1.1.12)
85
+ ruby-debug-base (0.10.4)
86
+ linecache (>= 0.3)
87
+ ruby-debug-ide (0.4.9)
88
+ rake (>= 0.8.1)
89
+ rubyforge (0.4.5)
90
+ syntax (1.0.0)
91
+
92
+ PLATFORMS
93
+ ruby
94
+
95
+ DEPENDENCIES
96
+ SyslogLogger (= 1.4.0)
97
+ ZenTest (= 4.3.3)
98
+ bullet (= 1.7.6)
99
+ capistrano (= 2.11.2)
100
+ cgi_multipart_eof_fix (= 2.5.0)
101
+ daemon_controller (= 1.0.0)
102
+ diff-lcs (= 1.1.3)
103
+ fastthread (= 1.0.7)
104
+ gem_plugin (= 0.2.3)
105
+ highline (= 1.6.11)
106
+ hoe (= 2.14.0)
107
+ image_science (= 1.2.4)
108
+ json (~> 1.5.5)
109
+ launchy (>= 2.0.0)
110
+ linecache (= 0.46)
111
+ mongrel (= 1.1.5)
112
+ mysql (= 2.8.1)
113
+ needle (= 1.3.0)
114
+ net-scp (= 1.0.4)
115
+ net-sftp (= 2.0.5)
116
+ net-ssh (= 2.3.0)
117
+ net-ssh-gateway (= 1.1.0)
118
+ passenger (= 3.0.11)
119
+ production_log_analyzer (= 1.5.1)
120
+ rack (= 1.2.4)
121
+ rails (= 1.2.6)
122
+ rails_analyzer_tools (= 1.4.0)
123
+ rake (~> 0.9)
124
+ rbx-require-relative (= 0.0.9)
125
+ rcov (= 0.9.11)
126
+ rdoc
127
+ rdoc-data
128
+ rspec (= 1.1.12)
129
+ rspec-rails (= 1.1.12)
130
+ ruby-debug-base (= 0.10.4)
131
+ ruby-debug-ide (= 0.4.9)
132
+ rubyforge (= 0.4.5)
133
+ syntax
@@ -0,0 +1,18 @@
1
+ include:
2
+ - lang.ruby
3
+
4
+ railsapp_gems:
5
+ file.recurse:
6
+ - source: salt://railsapp/files
7
+ - name: /tmp
8
+ - file_mode: 644
9
+ - user: {{ pillar['username'] }}
10
+ cmd.run:
11
+ # Run twice if first fails (weirdness with installing ruby-debug)
12
+ - name: {{ pillar['homedir'] }}/.rbenv/shims/bundle install || {{ pillar['homedir'] }}/.rbenv/shims/bundle install
13
+ - cwd: /tmp
14
+ - user: {{ pillar['username'] }}
15
+ - require:
16
+ - file: railsapp_gems
17
+ - gem.installed: base_gems
18
+
@@ -0,0 +1,3 @@
1
+ include:
2
+ - railsapp.gems
3
+ - railsapp.database
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ sudo salt-call state.highstate --local
@@ -0,0 +1,259 @@
1
+ ##### Primary configuration settings #####
2
+ ##########################################
3
+ # Set the location of the salt master server, if the master server cannot be
4
+ # resolved, then the minion will fail to start.
5
+ #master: salt
6
+ {% if master is defined -%} master: {{ master }}{% endif %}
7
+
8
+ # Set the port used by the master reply and authentication server
9
+ #master_port: 4506
10
+ {% if master_port is defined -%} master_port: {{ master_port }}{% endif %}
11
+
12
+ # The user to run salt
13
+ #user: root
14
+ {% if salt_user is defined -%} user: {{ salt_user }}{% endif %}
15
+
16
+ # The root directory prepended to these options: pki_dir, cachedir, log_file.
17
+ #root_dir: /
18
+ {% if root_dir is defined -%} root_dir: {{ root_dir }}{% endif %}
19
+
20
+ # The directory to store the pki information in
21
+ #pki_dir: /etc/salt/pki
22
+ {% if pki_dir is defined -%} pki_dir: {{ pki_dir }}{% endif %}
23
+
24
+ # Explicitly declare the id for this minion to use, if left commented the id
25
+ # will be the hostname as returned by the python call: socket.getfqdn()
26
+ # Since salt uses detached ids it is possible to run multiple minions on the
27
+ # same machine but with different ids, this can be useful for salt compute
28
+ # clusters.
29
+ #id:
30
+ {% if id is defined -%} id: {{ id }}{% endif %}
31
+
32
+ # Append a domain to a hostname in the event that it does not exist. This is
33
+ # useful for systems where socket.getfqdn() does not actually result in a
34
+ # FQDN (for instance, Solaris).
35
+ #append_domain:
36
+ {% if append_domain is defined -%} append_domain: {{ append_domain }}{% endif %}
37
+
38
+ # If the connection to the server is interrupted, the minion will
39
+ # attempt to reconnect. sub_timeout allows you to control the rate
40
+ # of reconnection attempts (in seconds). To disable reconnects, set
41
+ # this value to 0.
42
+ #sub_timeout: 60
43
+ {% if sub_timeout is defined -%} sub_timeout: {{ sub_timeout }}{% endif %}
44
+
45
+ # Where cache data goes
46
+ #cachedir: /var/cache/salt
47
+ {% if cachedir is defined -%} cachedir: {{ cachedir }}{% endif %}
48
+
49
+ # The minion can locally cache the return data from jobs sent to it, this
50
+ # can be a good way to keep track of jobs the minion has executed
51
+ # (on the minion side). By default this feature is disabled, to enable
52
+ # set cache_jobs to True
53
+ #cache_jobs: False
54
+ {% if cache_jobs is defined -%} cache_jobs: {{ cache_jobs }}{% endif %}
55
+
56
+ # When waiting for a master to accept the minion's public key, salt will
57
+ # continuously attempt to reconnect until successful. This is the time, in
58
+ # seconds, between those reconnection attempts.
59
+ #acceptance_wait_time = 10
60
+ {% if acceptance_wait_time is defined -%} acceptance_wait_time: {{ acceptance_wait_time }}{% endif %}
61
+
62
+ # When healing a dns_check is run, this is to make sure that the originally
63
+ # resolved dns has not changed, if this is something that does not happen in
64
+ # your environment then set this value to False.
65
+ #dns_check: True
66
+ {% if dns_check is defined -%} dns_check: {{ dns_check }}{% endif %}
67
+
68
+
69
+ ##### Minion module management #####
70
+ ##########################################
71
+ # Disable specific modules. This allows the admin to limit the level of
72
+ # access the master has to the minion
73
+ #disable_modules: [cmd,test]
74
+ {% if disable_modules is defined -%} disable_modules: {{ disable_modules }}{% endif %}
75
+ #disable_returners: []
76
+ {% if disable_returners is defined -%} disable_returners: {{ disable_returners }}{% endif %}
77
+ #
78
+ # Modules can be loaded from arbitrary paths. This enables the easy deployment
79
+ # of third party modules. Modules for returners and minions can be loaded.
80
+ # Specify a list of extra directories to search for minion modules and
81
+ # returners. These paths must be fully qualified!
82
+ #module_dirs: []
83
+ {% if module_dirs is defined -%} module_dirs: {{ module_dirs }}{% endif %}
84
+ #returner_dirs: []
85
+ {% if returner_dirs is defined -%} returner_dirs: {{ returner_dirs }}{% endif %}
86
+ #states_dirs: []
87
+ {% if states_dirs is defined -%} states_dirs: {{ states_dirs }}{% endif %}
88
+ #render_dirs: []
89
+ {% if render_dirs is defined -%} render_dirs: {{ render_dirs }}{% endif %}
90
+ #
91
+ # A module provider can be statically overwritten or extended for the minion
92
+ # via the providers option, in this case the default module will be
93
+ # overwritten by the specified module. In this example the pkg module will
94
+ # be provided by the yumpkg5 module instead of the system default.
95
+ #
96
+ # providers:
97
+ # pkg: yumpkg5
98
+ #
99
+ {% if providers is defined -%} providers: {{ providers }}{% endif %}
100
+ # Enable Cython modules searching and loading. (Default: False)
101
+ #cython_enable: False
102
+ {% if cython_enable is defined -%} cython_enable: {{ cython_enable }}{% endif %}
103
+
104
+ ##### State Management Settings #####
105
+ ###########################################
106
+ # The state management system executes all of the state templates on the minion
107
+ # to enable more granular control of system state management. The type of
108
+ # template and serialization used for state management needs to be configured
109
+ # on the minion, the default renderer is yaml_jinja. This is a yaml file
110
+ # rendered from a jinja template, the available options are:
111
+ # yaml_jinja
112
+ # yaml_mako
113
+ # json_jinja
114
+ # json_mako
115
+ #
116
+ #renderer: yaml_jinja
117
+ {% if renderer is defined -%} renderer: {{ renderer }}{% endif %}
118
+ #
119
+ # autoload_dynamic_modules Turns on automatic loading of modules found in the
120
+ # environments on the master. This is turned on by default, to turn of
121
+ # autoloading modules when states run set this value to False
122
+ #autoload_dynamic_modules: True
123
+ {% if autoload_dynamic_modules is defined -%} autoload_dynamic_modules: {{ autoload_dynamic_modules }}{% endif %}
124
+ #
125
+ # clean_dynamic_modules keeps the dynamic modules on the minion in sync with
126
+ # the dynamic modules on the master, this means that if a dynamic module is
127
+ # not on the master it will be deleted from the minion. By default this is
128
+ # enabled and can be disabled by changing this value to False
129
+ #clean_dynamic_modules: True
130
+ {% if clean_dynamic_modules is defined -%} clean_dynamic_modules: {{ clean_dynamic_modules }}{% endif %}
131
+ #
132
+ # Normally the minion is not isolated to any single environment on the master
133
+ # when running states, but the environment can be isolated on the minion side
134
+ # by statically setting it. Remember that the recommended way to manage
135
+ # environments is to isolate via the top file.
136
+ #environment: None
137
+ {% if environment is defined -%} environment: {{ environment }}{% endif %}
138
+ #
139
+ # If using the local file directory, then the state top file name needs to be
140
+ # defined, by default this is top.sls.
141
+ #state_top: top.sls
142
+ {% if state_top is defined -%} state_top: {{ state_top }}{% endif %}
143
+
144
+ ##### File Directory Settings #####
145
+ ##########################################
146
+ # The Salt Minion can redirect all file server operations to a local directory,
147
+ # this allows for the same state tree that is on the master to be used if
148
+ # copied completely onto the minion. This is a literal copy of the settings on
149
+ # the master but used to reference a local directory on the minion.
150
+
151
+ # Set the file client, the client defaults to looking on the master server for
152
+ # files, but can be directed to look at the local file directory setting
153
+ # defined below by setting it to local.
154
+ #file_client: remote
155
+ {% if file_client is defined -%} file_client: {{ file_client }}{% endif %}
156
+
157
+ # The file directory works on environments passed to the minion, each environment
158
+ # can have multiple root directories, the subdirectories in the multiple file
159
+ # roots cannot match, otherwise the downloaded files will not be able to be
160
+ # reliably ensured. A base environment is required to house the top file.
161
+ # Example:
162
+ # file_roots:
163
+ # base:
164
+ # - /srv/salt/
165
+ # dev:
166
+ # - /srv/salt/dev/services
167
+ # - /srv/salt/dev/states
168
+ # prod:
169
+ # - /srv/salt/prod/services
170
+ # - /srv/salt/prod/states
171
+ #
172
+ # Default:
173
+ #file_roots:
174
+ # base:
175
+ # - /srv/salt
176
+ {% if file_roots is defined -%} file_roots: {{ file_roots }}{% endif %}
177
+
178
+ # The hash_type is the hash to use when discovering the hash of a file in
179
+ # the minion directory, the default is md5, but sha1, sha224, sha256, sha384
180
+ # and sha512 are also supported.
181
+ #hash_type: md5
182
+ {% if hash_type is defined -%} hash_type: {{ hash_type }}{% endif %}
183
+
184
+ # The Salt pillar is searched for locally if file_client is set to local. If
185
+ # this is the case, and pillar data is defined, then the pillar_roots need to
186
+ # also be configured on the minion:
187
+ #pillar_roots:
188
+ # base:
189
+ # - /srv/pillar
190
+ {% if pillar_roots is defined -%} pillar_roots: {{ pillar_roots }}{% endif %}
191
+
192
+ ###### Security settings #####
193
+ ###########################################
194
+ # Enable "open mode", this mode still maintains encryption, but turns off
195
+ # authentication, this is only intended for highly secure environments or for
196
+ # the situation where your keys end up in a bad state. If you run in open mode
197
+ # you do so at your own risk!
198
+ #open_mode: False
199
+ {% if open_mode is defined -%} open_mode: {{ open_mode }}{% endif %}
200
+
201
+
202
+ ###### Thread settings #####
203
+ ###########################################
204
+ # Disable multiprocessing support, by default when a minion receives a
205
+ # publication a new process is spawned and the command is executed therein.
206
+ #multiprocessing: True
207
+ {% if multiprocessing is defined -%} multiprocessing: {{ multiprocessing }}{% endif %}
208
+
209
+ ###### Logging settings #####
210
+ ###########################################
211
+ # The location of the minion log file
212
+ #log_file: /var/log/salt/minion
213
+ #
214
+ # The level of messages to send to the log file.
215
+ # One of 'info', 'quiet', 'critical', 'error', 'debug', 'warning'.
216
+ # Default: 'warning'
217
+ #log_level: warning
218
+ {% if log_level is defined -%} log_level: {{ log_level }}{% endif %}
219
+ #
220
+ # Logger levels can be used to tweak specific loggers logging levels.
221
+ # For example, if you want to have the salt library at the 'warning' level,
222
+ # but you still wish to have 'salt.modules' at the 'debug' level:
223
+ # log_granular_levels: {
224
+ # 'salt': 'warning',
225
+ # 'salt.modules': 'debug'
226
+ # }
227
+ #
228
+ #log_granular_levels: {}
229
+ {% if log_granular_levels is defined -%} log_granular_levels: {{ log_granular_levels }}{% endif %}
230
+
231
+ ###### Module configuration #####
232
+ ###########################################
233
+ # Salt allows for modules to be passed arbitrary configuration data, any data
234
+ # passed here in valid yaml format will be passed on to the salt minion modules
235
+ # for use. It is STRONGLY recommended that a naming convention be used in which
236
+ # the module name is followed by a . and then the value. Also, all top level
237
+ # data must be applied via the yaml dict construct, some examples:
238
+ #
239
+ # A simple value for the test module:
240
+ #test.foo: foo
241
+ #
242
+ # A list for the test module:
243
+ #test.bar: [baz,quo]
244
+ #
245
+ # A dict for the test module:
246
+ #test.baz: {spam: sausage, cheese: bread}
247
+
248
+ {%- if module_settings is defined %}
249
+ {%- for modules in module_settings %}
250
+ {%- for module, options in modules.items() %}
251
+ {%- for option in options %}
252
+ {%- for key in option %}
253
+ {{ module }}.{{ key }}: {{ option[key] }}
254
+
255
+ {%- endfor %}
256
+ {%- endfor %}
257
+ {%- endfor %}
258
+ {%- endfor %}
259
+ {%- endif %}