freighthop 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Puppetfile +1 -0
- data/Puppetfile.lock +3 -0
- data/Vagrantfile +1 -1
- data/bin/fh +2 -78
- data/lib/freighthop/cli/help.rb +69 -0
- data/lib/freighthop/cli/ssh.rb +46 -0
- data/lib/freighthop/cli/vagrant.rb +26 -0
- data/lib/freighthop/cli.rb +40 -0
- data/lib/freighthop/config.rb +4 -0
- data/lib/freighthop/vagrant_env.rb +24 -0
- data/lib/freighthop/version.rb +1 -1
- data/lib/freighthop.rb +7 -4
- data/local_modules/freighthop/manifests/database/mysql.pp +20 -0
- data/local_modules/freighthop/manifests/database/postgres.pp +6 -6
- data/local_modules/freighthop/manifests/database.pp +6 -8
- data/local_modules/freighthop/manifests/init.pp +1 -8
- data/local_modules/freighthop/manifests/params.pp +0 -3
- data/modules/apt/CHANGELOG +12 -2
- data/modules/apt/Gemfile +6 -5
- data/modules/apt/Gemfile.lock +40 -5
- data/modules/apt/Modulefile +1 -1
- data/modules/apt/README.md +2 -1
- data/modules/apt/Rakefile +1 -0
- data/modules/apt/manifests/init.pp +4 -1
- data/modules/apt/manifests/ppa.pp +1 -1
- data/modules/apt/manifests/update.pp +1 -0
- data/modules/apt/metadata.json +21 -13
- data/modules/apt/spec/defines/ppa_spec.rb +3 -3
- data/modules/apt/spec/defines/source_spec.rb +2 -2
- data/modules/apt/spec/spec_helper_system.rb +30 -0
- data/modules/apt/spec/system/apt_builddep_spec.rb +38 -0
- data/modules/apt/spec/system/apt_key_spec.rb +53 -0
- data/modules/apt/spec/system/apt_ppa_spec.rb +59 -0
- data/modules/apt/spec/system/apt_source_spec.rb +51 -0
- data/modules/apt/spec/system/basic_spec.rb +10 -0
- data/modules/apt/spec/system/class_spec.rb +20 -0
- data/modules/apt/templates/source.list.erb +2 -2
- data/modules/freighthop/manifests/database/mysql.pp +20 -0
- data/modules/freighthop/manifests/database/postgres.pp +6 -6
- data/modules/freighthop/manifests/database.pp +6 -8
- data/modules/freighthop/manifests/init.pp +1 -8
- data/modules/freighthop/manifests/params.pp +0 -3
- data/modules/mysql/CHANGELOG +403 -0
- data/modules/mysql/Gemfile +24 -0
- data/modules/mysql/Gemfile.lock +129 -0
- data/modules/mysql/LICENSE +201 -0
- data/modules/mysql/Modulefile +9 -0
- data/modules/mysql/README.md +492 -0
- data/modules/mysql/Rakefile +2 -0
- data/modules/mysql/TODO +8 -0
- data/modules/mysql/files/mysqltuner.pl +966 -0
- data/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb +52 -0
- data/modules/mysql/lib/puppet/parser/functions/mysql_password.rb +15 -0
- data/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb +21 -0
- data/modules/mysql/lib/puppet/provider/database/mysql.rb +52 -0
- data/modules/mysql/lib/puppet/provider/database_grant/mysql.rb +210 -0
- data/modules/mysql/lib/puppet/provider/database_user/mysql.rb +76 -0
- data/modules/mysql/lib/puppet/provider/mysql.rb +67 -0
- data/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb +68 -0
- data/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb +115 -0
- data/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb +115 -0
- data/modules/mysql/lib/puppet/type/database.rb +21 -0
- data/modules/mysql/lib/puppet/type/database_grant.rb +79 -0
- data/modules/mysql/lib/puppet/type/database_user.rb +31 -0
- data/modules/mysql/lib/puppet/type/mysql_database.rb +22 -0
- data/modules/mysql/lib/puppet/type/mysql_grant.rb +72 -0
- data/modules/mysql/lib/puppet/type/mysql_user.rb +45 -0
- data/modules/mysql/manifests/backup.pp +31 -0
- data/modules/mysql/manifests/bindings/java.pp +10 -0
- data/modules/mysql/manifests/bindings/perl.pp +10 -0
- data/modules/mysql/manifests/bindings/php.pp +10 -0
- data/modules/mysql/manifests/bindings/python.pp +10 -0
- data/modules/mysql/manifests/bindings/ruby.pp +10 -0
- data/modules/mysql/manifests/bindings.pp +33 -0
- data/modules/mysql/manifests/client/install.pp +8 -0
- data/modules/mysql/manifests/client.pp +27 -0
- data/modules/mysql/manifests/db.pp +59 -0
- data/modules/mysql/manifests/init.pp +100 -0
- data/modules/mysql/manifests/params.pp +230 -0
- data/modules/mysql/manifests/server/account_security.pp +22 -0
- data/modules/mysql/manifests/server/backup.pp +56 -0
- data/modules/mysql/manifests/server/config.pp +31 -0
- data/modules/mysql/manifests/server/install.pp +9 -0
- data/modules/mysql/manifests/server/monitor.pp +24 -0
- data/modules/mysql/manifests/server/mysqltuner.pp +9 -0
- data/modules/mysql/manifests/server/providers.pp +8 -0
- data/modules/mysql/manifests/server/root_password.pp +21 -0
- data/modules/mysql/manifests/server/service.pp +19 -0
- data/modules/mysql/manifests/server.pp +69 -0
- data/modules/mysql/metadata.json +289 -0
- data/modules/mysql/spec/classes/mysql_bindings_spec.rb +58 -0
- data/modules/mysql/spec/classes/mysql_client_spec.rb +16 -0
- data/modules/mysql/spec/classes/mysql_server_account_security_spec.rb +41 -0
- data/modules/mysql/spec/classes/mysql_server_backup_spec.rb +112 -0
- data/modules/mysql/spec/classes/mysql_server_monitor_spec.rb +31 -0
- data/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb +5 -0
- data/modules/mysql/spec/classes/mysql_server_spec.rb +162 -0
- data/modules/mysql/spec/defines/mysql_db_spec.rb +51 -0
- data/modules/mysql/spec/spec.opts +6 -0
- data/modules/mysql/spec/spec_helper.rb +5 -0
- data/modules/mysql/spec/spec_helper_system.rb +28 -0
- data/modules/mysql/spec/system/mysql_account_delete_spec.rb +35 -0
- data/modules/mysql/spec/system/mysql_backup_spec.rb +77 -0
- data/modules/mysql/spec/system/mysql_bindings_spec.rb +90 -0
- data/modules/mysql/spec/system/mysql_db_spec.rb +61 -0
- data/modules/mysql/spec/system/mysql_server_monitor_spec.rb +30 -0
- data/modules/mysql/spec/system/mysql_server_root_password_spec.rb +71 -0
- data/modules/mysql/spec/system/mysql_server_spec.rb +85 -0
- data/modules/mysql/spec/system/types/mysql_grant_spec.rb +314 -0
- data/modules/mysql/spec/system/types/mysql_user_spec.rb +35 -0
- data/modules/mysql/spec/unit/mysql_password_spec.rb +27 -0
- data/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb +77 -0
- data/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb +86 -0
- data/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb +95 -0
- data/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb +119 -0
- data/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb +118 -0
- data/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb +130 -0
- data/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb +29 -0
- data/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb +30 -0
- data/modules/mysql/templates/my.cnf.erb +17 -0
- data/modules/mysql/templates/my.cnf.pass.erb +7 -0
- data/modules/mysql/templates/my.conf.cnf.erb +17 -0
- data/modules/mysql/templates/mysqlbackup.sh.erb +57 -0
- data/modules/mysql/tests/backup.pp +8 -0
- data/modules/mysql/tests/bindings.pp +3 -0
- data/modules/mysql/tests/init.pp +1 -0
- data/modules/mysql/tests/java.pp +1 -0
- data/modules/mysql/tests/mysql_database.pp +12 -0
- data/modules/mysql/tests/mysql_grant.pp +5 -0
- data/modules/mysql/tests/mysql_user.pp +23 -0
- data/modules/mysql/tests/perl.pp +1 -0
- data/modules/mysql/tests/python.pp +1 -0
- data/modules/mysql/tests/ruby.pp +1 -0
- data/modules/mysql/tests/server/account_security.pp +4 -0
- data/modules/mysql/tests/server/config.pp +11 -0
- data/modules/mysql/tests/server.pp +3 -0
- data/modules/postgresql/Changelog +191 -0
- data/modules/postgresql/Gemfile +1 -0
- data/modules/postgresql/Gemfile.lock +9 -0
- data/modules/postgresql/LICENSE +198 -12
- data/modules/postgresql/Modulefile +2 -2
- data/modules/postgresql/NOTICE +14 -0
- data/modules/postgresql/README.md +435 -184
- data/modules/postgresql/files/validate_postgresql_connection.sh +31 -0
- data/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb +37 -0
- data/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb +4 -0
- data/modules/postgresql/lib/puppet/type/postgresql_conf.rb +31 -0
- data/modules/postgresql/lib/puppet/type/postgresql_psql.rb +4 -0
- data/modules/postgresql/manifests/client.pp +17 -16
- data/modules/postgresql/manifests/globals.pp +95 -0
- data/modules/postgresql/manifests/lib/devel.pp +15 -0
- data/modules/postgresql/manifests/lib/java.pp +15 -0
- data/modules/postgresql/manifests/lib/python.pp +13 -0
- data/modules/postgresql/manifests/params.pp +127 -222
- data/modules/postgresql/manifests/repo/apt_postgresql_org.pp +30 -0
- data/modules/postgresql/manifests/repo/yum_postgresql_org.pp +38 -0
- data/modules/postgresql/manifests/repo.pp +22 -0
- data/modules/postgresql/manifests/server/config.pp +113 -0
- data/modules/postgresql/manifests/server/config_entry.pp +43 -0
- data/modules/postgresql/manifests/server/contrib.pp +27 -0
- data/modules/postgresql/manifests/server/database.pp +75 -0
- data/modules/postgresql/manifests/server/database_grant.pp +18 -0
- data/modules/postgresql/manifests/server/db.pp +36 -0
- data/modules/postgresql/manifests/server/firewall.pp +21 -0
- data/modules/postgresql/manifests/server/grant.pp +81 -0
- data/modules/postgresql/manifests/server/initdb.pp +52 -0
- data/modules/postgresql/manifests/server/install.pp +49 -0
- data/modules/postgresql/manifests/server/passwd.pp +34 -0
- data/modules/postgresql/manifests/server/pg_hba_rule.pp +54 -0
- data/modules/postgresql/manifests/server/plperl.pp +27 -0
- data/modules/postgresql/manifests/server/reload.pp +15 -0
- data/modules/postgresql/manifests/{role.pp → server/role.pp} +19 -33
- data/modules/postgresql/manifests/server/service.pp +40 -0
- data/modules/postgresql/manifests/{table_grant.pp → server/table_grant.pp} +4 -4
- data/modules/postgresql/manifests/server/tablespace.pp +42 -0
- data/modules/postgresql/manifests/server.pp +61 -83
- data/modules/postgresql/manifests/validate_db_connection.pp +49 -50
- data/modules/postgresql/metadata.json +123 -73
- data/modules/postgresql/spec/spec_helper_system.rb +13 -1
- data/modules/postgresql/spec/system/client_spec.rb +22 -0
- data/modules/postgresql/spec/system/common_patterns_spec.rb +53 -0
- data/modules/postgresql/spec/system/contrib_spec.rb +33 -0
- data/modules/postgresql/spec/system/lib/devel_spec.rb +22 -0
- data/modules/postgresql/spec/system/lib/java_spec.rb +25 -0
- data/modules/postgresql/spec/system/lib/python_spec.rb +24 -0
- data/modules/postgresql/spec/system/postgresql_psql_spec.rb +51 -0
- data/modules/postgresql/spec/system/server/config_entry_spec.rb +32 -0
- data/modules/postgresql/spec/system/server/database_grant_spec.rb +54 -0
- data/modules/postgresql/spec/system/server/database_spec.rb +35 -0
- data/modules/postgresql/spec/system/server/db_spec.rb +143 -0
- data/modules/postgresql/spec/system/server/grant_spec.rb +55 -0
- data/modules/postgresql/spec/system/server/pg_hba_rule_spec.rb +85 -0
- data/modules/postgresql/spec/system/server/plperl_spec.rb +29 -0
- data/modules/postgresql/spec/system/server/role_spec.rb +103 -0
- data/modules/postgresql/spec/system/server/table_grant_spec.rb +72 -0
- data/modules/postgresql/spec/system/server/tablespace_spec.rb +74 -0
- data/modules/postgresql/spec/system/server_spec.rb +217 -0
- data/modules/postgresql/spec/system/validate_db_connection_spec.rb +91 -0
- data/modules/postgresql/spec/unit/classes/client_spec.rb +27 -2
- data/modules/postgresql/spec/unit/classes/globals_spec.rb +28 -0
- data/modules/postgresql/spec/unit/classes/lib/devel_spec.rb +12 -0
- data/modules/postgresql/spec/unit/classes/{postgresql_java_spec.rb → lib/java_spec.rb} +9 -19
- data/modules/postgresql/spec/unit/classes/lib/python_spec.rb +31 -0
- data/modules/postgresql/spec/unit/classes/params_spec.rb +2 -1
- data/modules/postgresql/spec/unit/classes/repo_spec.rb +17 -0
- data/modules/postgresql/spec/unit/classes/server/contrib_spec.rb +42 -0
- data/modules/postgresql/spec/unit/classes/server/initdb_spec.rb +28 -0
- data/modules/postgresql/spec/unit/classes/server/plperl_spec.rb +45 -0
- data/modules/postgresql/spec/unit/classes/server_spec.rb +83 -2
- data/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb +23 -0
- data/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb +26 -0
- data/modules/postgresql/spec/unit/defines/server/database_spec.rb +16 -0
- data/modules/postgresql/spec/unit/defines/server/db_spec.rb +28 -0
- data/modules/postgresql/spec/unit/defines/{database_grant_spec.rb → server/grant_spec.rb} +7 -4
- data/modules/postgresql/spec/unit/defines/{pg_hba_rule_spec.rb → server/pg_hba_rule_spec.rb} +59 -2
- data/modules/postgresql/spec/unit/defines/server/role_spec.rb +23 -0
- data/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb +27 -0
- data/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb +23 -0
- data/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb +22 -9
- data/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb +112 -0
- data/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb +29 -0
- data/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb +1 -0
- data/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb +50 -0
- metadata +177 -53
- data/modules/postgresql/examples/init.pp +0 -1
- data/modules/postgresql/examples/official-postgresql-repos.pp +0 -19
- data/modules/postgresql/examples/postgresql_database.pp +0 -22
- data/modules/postgresql/examples/postgresql_db.pp +0 -30
- data/modules/postgresql/examples/postgresql_grant.pp +0 -14
- data/modules/postgresql/examples/postgresql_pg_hba_rule.pp +0 -18
- data/modules/postgresql/examples/postgresql_pgconf_extras.pp +0 -19
- data/modules/postgresql/examples/postgresql_tablespace.pp +0 -73
- data/modules/postgresql/examples/postgresql_user.pp +0 -28
- data/modules/postgresql/examples/server.pp +0 -10
- data/modules/postgresql/lib/facter/postgres_default_version.rb +0 -69
- data/modules/postgresql/manifests/config/afterservice.pp +0 -47
- data/modules/postgresql/manifests/config/beforeservice.pp +0 -171
- data/modules/postgresql/manifests/config.pp +0 -74
- data/modules/postgresql/manifests/contrib.pp +0 -29
- data/modules/postgresql/manifests/database.pp +0 -85
- data/modules/postgresql/manifests/database_grant.pp +0 -35
- data/modules/postgresql/manifests/database_user.pp +0 -60
- data/modules/postgresql/manifests/db.pp +0 -77
- data/modules/postgresql/manifests/devel.pp +0 -27
- data/modules/postgresql/manifests/grant.pp +0 -77
- data/modules/postgresql/manifests/init.pp +0 -145
- data/modules/postgresql/manifests/initdb.pp +0 -52
- data/modules/postgresql/manifests/java.pp +0 -29
- data/modules/postgresql/manifests/package_source/apt_postgresql_org.pp +0 -21
- data/modules/postgresql/manifests/package_source/yum_postgresql_org.pp +0 -30
- data/modules/postgresql/manifests/pg_hba.pp +0 -19
- data/modules/postgresql/manifests/pg_hba_rule.pp +0 -41
- data/modules/postgresql/manifests/plperl.pp +0 -24
- data/modules/postgresql/manifests/psql.pp +0 -56
- data/modules/postgresql/manifests/python.pp +0 -18
- data/modules/postgresql/manifests/tablespace.pp +0 -59
- data/modules/postgresql/spec/system/install_spec.rb +0 -707
- data/modules/postgresql/spec/system/non_defaults_spec.rb +0 -114
- data/modules/postgresql/spec/unit/classes/contrib_spec.rb +0 -11
- data/modules/postgresql/spec/unit/classes/devel_spec.rb +0 -11
- data/modules/postgresql/spec/unit/classes/init_spec.rb +0 -71
- data/modules/postgresql/spec/unit/classes/postgresql_python_spec.rb +0 -53
- data/modules/postgresql/spec/unit/defines/database_spec.rb +0 -14
- data/modules/postgresql/spec/unit/defines/database_user_spec.rb +0 -19
- data/modules/postgresql/spec/unit/defines/db_spec.rb +0 -20
- data/modules/postgresql/spec/unit/defines/pg_hba_spec.rb +0 -20
- data/modules/postgresql/spec/unit/defines/psql_spec.rb +0 -20
- data/modules/postgresql/spec/unit/defines/role_spec.rb +0 -14
- data/modules/postgresql/spec/unit/defines/tablespace_spec.rb +0 -19
- data/modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb +0 -14
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright 2013 Puppet Labs
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
name 'puppetlabs-mysql'
|
2
|
+
version '2.1.0'
|
3
|
+
source 'git://github.com/puppetlabs/puppetlabs-mysql.git'
|
4
|
+
author 'Puppet Labs'
|
5
|
+
license 'Apache 2.0'
|
6
|
+
summary 'Mysql module'
|
7
|
+
description 'Mysql module'
|
8
|
+
project_page 'http://github.com/puppetlabs/puppetlabs-mysql'
|
9
|
+
dependency 'puppetlabs/stdlib', '>= 2.2.1'
|
@@ -0,0 +1,492 @@
|
|
1
|
+
#MySQL
|
2
|
+
|
3
|
+
####Table of Contents
|
4
|
+
|
5
|
+
1. [Overview](#overview)
|
6
|
+
2. [Module Description - What the module does and why it is useful](#module-description)
|
7
|
+
3. [Setup - The basics of getting started with mysql](#setup)
|
8
|
+
* [What mysql affects](#what-mysql-affects)
|
9
|
+
* [Setup requirements](#setup-requirements)
|
10
|
+
* [Beginning with mysql](#beginning-with-mysql)
|
11
|
+
4. [Usage - Configuration options and additional functionality](#usage)
|
12
|
+
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
|
13
|
+
5. [Limitations - OS compatibility, etc.](#limitations)
|
14
|
+
6. [Development - Guide for contributing to the module](#development)
|
15
|
+
|
16
|
+
##Overview
|
17
|
+
|
18
|
+
The MySQL module installs, configures, and manages the MySQL service.
|
19
|
+
|
20
|
+
##Module Description
|
21
|
+
|
22
|
+
The MySQL module manages both the installation and configuration of MySQL as
|
23
|
+
well as extends Pupppet to allow management of MySQL resources, such as
|
24
|
+
databases, users, and grants.
|
25
|
+
|
26
|
+
##Backwards Compatibility
|
27
|
+
|
28
|
+
This module has just undergone a very large rewrite. As a result it will no
|
29
|
+
longer work with the previous classes and configuration as before. We've
|
30
|
+
attempted to handle backwards compatibility automatically by adding a
|
31
|
+
`attempt_compatibility_mode` parameter to the main mysql class. If you set
|
32
|
+
this to true it will attempt to map your previous parameters into the new
|
33
|
+
`mysql::server` class.
|
34
|
+
|
35
|
+
###WARNING
|
36
|
+
|
37
|
+
This may fail. It may eat your MySQL server. PLEASE test it before running it
|
38
|
+
live. Even if it's just a no-op and a manual comparision. Please be careful!
|
39
|
+
|
40
|
+
##Setup
|
41
|
+
|
42
|
+
###What MySQL affects
|
43
|
+
|
44
|
+
* MySQL package.
|
45
|
+
* MySQL configuration files.
|
46
|
+
* MySQL service.
|
47
|
+
|
48
|
+
###Beginning with MySQL
|
49
|
+
|
50
|
+
If you just want a server installing with the default options you can run
|
51
|
+
`include '::mysql::server'`. If you need to customize options, such as the root
|
52
|
+
password or /etc/my.cnf settings then you can also include `mysql::server` and
|
53
|
+
pass in an override hash as seen below:
|
54
|
+
|
55
|
+
```puppet
|
56
|
+
class { '::mysql::server':
|
57
|
+
root_password => 'strongpassword',
|
58
|
+
override_options => { 'mysqld' => { 'max_connections' => '1024' } }
|
59
|
+
}
|
60
|
+
```
|
61
|
+
|
62
|
+
##Usage
|
63
|
+
|
64
|
+
All interaction for the server is done via `mysql::server`. To install the
|
65
|
+
client you use `mysql::client`, and to install bindings you can use
|
66
|
+
`mysql::bindings`.
|
67
|
+
|
68
|
+
###Overrides
|
69
|
+
|
70
|
+
The hash structure for overrides in `mysql::server` is as follows:
|
71
|
+
|
72
|
+
```puppet
|
73
|
+
$override_options = {
|
74
|
+
'section' => {
|
75
|
+
'item' => 'thing',
|
76
|
+
}
|
77
|
+
}
|
78
|
+
```
|
79
|
+
|
80
|
+
For items that you would traditionally represent as:
|
81
|
+
|
82
|
+
<pre>
|
83
|
+
[section]
|
84
|
+
thing
|
85
|
+
</pre>
|
86
|
+
|
87
|
+
You can just make an entry like `thing => true` in the hash. MySQL doesn't
|
88
|
+
care if thing is alone or set to a value, it'll happily accept both.
|
89
|
+
|
90
|
+
###Custom configuration
|
91
|
+
|
92
|
+
To add custom mysql configuration you can drop additional files into
|
93
|
+
`/etc/mysql/conf.d/` in order to override settings or add additional ones (if you
|
94
|
+
choose not to use override_options in `mysql::server`). This location is
|
95
|
+
hardcoded into the my.cnf template file.
|
96
|
+
|
97
|
+
##Reference
|
98
|
+
|
99
|
+
###Classes
|
100
|
+
|
101
|
+
####Public classes
|
102
|
+
* `mysql::server`: Installs and configures MySQL.
|
103
|
+
* `mysql::server::account_security`: Deletes default MySQL accounts.
|
104
|
+
* `mysql::server::monitor`: Sets up a monitoring user.
|
105
|
+
* `mysql::server::mysqltuner`: Installs MySQL tuner script.
|
106
|
+
* `mysql::server::backup`: Sets up MySQL backups via cron.
|
107
|
+
* `mysql::bindings`: Installs various MySQL language bindings.
|
108
|
+
* `mysql::client`: Installs MySQL client (for non-servers).
|
109
|
+
|
110
|
+
####Private classes
|
111
|
+
* `mysql::server::install`: Installs packages.
|
112
|
+
* `mysql::server::config`: Configures MYSQL.
|
113
|
+
* `mysql::server::service`: Manages service.
|
114
|
+
* `mysql::server::root_password`: Sets MySQL root password.
|
115
|
+
* `mysql::server::providers`: Creates users, grants, and databases.
|
116
|
+
* `mysql::bindings::java`: Installs Java bindings.
|
117
|
+
* `mysql::bindings::perl`: Installs Perl bindings.
|
118
|
+
* `mysql::bindings::python`: Installs Python bindings.
|
119
|
+
* `mysql::bindings::ruby`: Installs Ruby bindings.
|
120
|
+
* `mysql::client::install`: Installs MySQL client.
|
121
|
+
|
122
|
+
###Parameters
|
123
|
+
|
124
|
+
####mysql::server
|
125
|
+
|
126
|
+
#####`root_password`
|
127
|
+
|
128
|
+
What is the MySQL root password. Puppet will attempt to set it to this and update `/root/.my.cnf`.
|
129
|
+
|
130
|
+
#####`old_root_password`
|
131
|
+
|
132
|
+
What was the previous root password (REQUIRED if you wish to change the root password via Puppet.)
|
133
|
+
|
134
|
+
#####`override_options`
|
135
|
+
|
136
|
+
This is the hash of override options to pass into MySQL. It can be visualized
|
137
|
+
like a hash of the my.cnf file, so that entries look like:
|
138
|
+
|
139
|
+
```puppet
|
140
|
+
$override_options = {
|
141
|
+
'section' => {
|
142
|
+
'item' => 'thing',
|
143
|
+
}
|
144
|
+
}
|
145
|
+
```
|
146
|
+
|
147
|
+
For items that you would traditionally represent as:
|
148
|
+
|
149
|
+
<pre>
|
150
|
+
[section]
|
151
|
+
thing
|
152
|
+
</pre>
|
153
|
+
|
154
|
+
You can just make an entry like `thing => true` in the hash. MySQL doesn't
|
155
|
+
care if thing is alone or set to a value, it'll happily accept both.
|
156
|
+
|
157
|
+
#####`config_file`
|
158
|
+
|
159
|
+
The location of the MySQL configuration file.
|
160
|
+
|
161
|
+
#####`manage_config_file`
|
162
|
+
|
163
|
+
Should we manage the MySQL configuration file.
|
164
|
+
|
165
|
+
#####`purge_conf_dir`
|
166
|
+
|
167
|
+
Should we purge the conf.d directory?
|
168
|
+
|
169
|
+
#####`restart`
|
170
|
+
|
171
|
+
Should the service be restarted when things change?
|
172
|
+
|
173
|
+
#####`root_group`
|
174
|
+
|
175
|
+
What is the group used for root?
|
176
|
+
|
177
|
+
#####`package_ensure`
|
178
|
+
|
179
|
+
What to set the package to. Can be present, absent, or version.
|
180
|
+
|
181
|
+
#####`package_name`
|
182
|
+
|
183
|
+
What is the name of the mysql server package to install.
|
184
|
+
|
185
|
+
#####`remove_default_accounts`
|
186
|
+
|
187
|
+
Boolean to decide if we should automatically include
|
188
|
+
`mysql::server::account_security`.
|
189
|
+
|
190
|
+
#####`service_enabled`
|
191
|
+
|
192
|
+
Boolean to decide if the service should be enabled.
|
193
|
+
|
194
|
+
#####`service_manage`
|
195
|
+
|
196
|
+
Boolean to decide if the service should be managed.
|
197
|
+
|
198
|
+
#####`service_name`
|
199
|
+
|
200
|
+
What is the name of the mysql server service.
|
201
|
+
|
202
|
+
#####`service_provider`
|
203
|
+
|
204
|
+
Which provider to use to manage the service.
|
205
|
+
|
206
|
+
#####`users`
|
207
|
+
|
208
|
+
Optional hash of users to create, which are passed to [mysql_user](#mysql_user). Example:
|
209
|
+
```puppet
|
210
|
+
$users = {
|
211
|
+
'someuser@localhost' => {
|
212
|
+
ensure => 'present',
|
213
|
+
max_connections_per_hour => '0',
|
214
|
+
max_queries_per_hour => '0',
|
215
|
+
max_updates_per_hour => '0',
|
216
|
+
max_user_connections => '0',
|
217
|
+
password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF',
|
218
|
+
},
|
219
|
+
}
|
220
|
+
```
|
221
|
+
|
222
|
+
#####`grants`
|
223
|
+
|
224
|
+
Optional hash of grants, which are passed to [mysql_grant](#mysql_grant). Example:
|
225
|
+
```puppet
|
226
|
+
$grants = {
|
227
|
+
'someuser@localhost/somedb.*' => {
|
228
|
+
ensure => 'present',
|
229
|
+
options => ['GRANT'],
|
230
|
+
privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'],
|
231
|
+
table => 'somedb.*',
|
232
|
+
user => 'someuser@localhost',
|
233
|
+
},
|
234
|
+
}
|
235
|
+
```
|
236
|
+
|
237
|
+
#####`databases`
|
238
|
+
|
239
|
+
Optional hash of databases to create, which are passed to [mysql_database](#mysql_database). Example:
|
240
|
+
```puppet
|
241
|
+
$databases = {
|
242
|
+
'somedb' => {
|
243
|
+
ensure => 'present',
|
244
|
+
charset => 'utf8',
|
245
|
+
},
|
246
|
+
}
|
247
|
+
```
|
248
|
+
|
249
|
+
#####`service_provider`
|
250
|
+
|
251
|
+
####mysql::server::backup
|
252
|
+
|
253
|
+
#####`backupuser`
|
254
|
+
|
255
|
+
MySQL user to create for backing up.
|
256
|
+
|
257
|
+
#####`backuppassword`
|
258
|
+
|
259
|
+
MySQL user password for backups.
|
260
|
+
|
261
|
+
#####`backupdir`
|
262
|
+
|
263
|
+
Directory to backup into.
|
264
|
+
|
265
|
+
#####`backupcompress`
|
266
|
+
|
267
|
+
Boolean to determine if backups should be compressed.
|
268
|
+
|
269
|
+
#####`backuprotate`
|
270
|
+
|
271
|
+
How many days to keep backups for.
|
272
|
+
|
273
|
+
#####`delete_before_dump`
|
274
|
+
|
275
|
+
Boolean to determine if you should cleanup before backing up or after.
|
276
|
+
|
277
|
+
#####`backupdatabases`
|
278
|
+
|
279
|
+
Array of databases to specifically backup.
|
280
|
+
|
281
|
+
#####`file_per_database`
|
282
|
+
|
283
|
+
Should a seperate file be used per database.
|
284
|
+
|
285
|
+
#####`ensure`
|
286
|
+
|
287
|
+
Present or absent, allows you to remove the backup scripts.
|
288
|
+
|
289
|
+
#####`time`
|
290
|
+
|
291
|
+
An array of two elements to set the time to backup. Allows ['23', '5'] or ['3', '45'] for HH:MM times.
|
292
|
+
|
293
|
+
####mysql::server::monitor
|
294
|
+
|
295
|
+
#####`mysql_monitor_username`
|
296
|
+
|
297
|
+
The username to create for MySQL monitoring.
|
298
|
+
|
299
|
+
#####`mysql_monitor_password`
|
300
|
+
|
301
|
+
The password to create for MySQL monitoring.
|
302
|
+
|
303
|
+
#####`mysql_monitor_hostname`
|
304
|
+
|
305
|
+
The hostname to allow to access the MySQL monitoring user.
|
306
|
+
|
307
|
+
####mysql::bindings
|
308
|
+
|
309
|
+
#####`java_enable`
|
310
|
+
|
311
|
+
Boolean to decide if the Java bindings should be installed.
|
312
|
+
|
313
|
+
#####`perl_enable`
|
314
|
+
|
315
|
+
Boolean to decide if the Perl bindings should be installed.
|
316
|
+
|
317
|
+
#####`php_enable`
|
318
|
+
|
319
|
+
Boolean to decide if the PHP bindings should be installed.
|
320
|
+
|
321
|
+
#####`python_enable`
|
322
|
+
|
323
|
+
Boolean to decide if the Python bindings should be installed.
|
324
|
+
|
325
|
+
#####`ruby_enable`
|
326
|
+
|
327
|
+
Boolean to decide if the Ruby bindings should be installed.
|
328
|
+
|
329
|
+
#####`java_package_ensure`
|
330
|
+
|
331
|
+
What to set the package to. Can be present, absent, or version.
|
332
|
+
|
333
|
+
#####`java_package_name`
|
334
|
+
|
335
|
+
The name of the package to install.
|
336
|
+
|
337
|
+
#####`java_package_provider`
|
338
|
+
|
339
|
+
What provider should be used to install the package.
|
340
|
+
|
341
|
+
#####`perl_package_ensure`
|
342
|
+
|
343
|
+
What to set the package to. Can be present, absent, or version.
|
344
|
+
|
345
|
+
#####`perl_package_name`
|
346
|
+
|
347
|
+
The name of the package to install.
|
348
|
+
|
349
|
+
#####`perl_package_provider`
|
350
|
+
|
351
|
+
What provider should be used to install the package.
|
352
|
+
|
353
|
+
#####`python_package_ensure`
|
354
|
+
|
355
|
+
What to set the package to. Can be present, absent, or version.
|
356
|
+
|
357
|
+
#####`python_package_name`
|
358
|
+
|
359
|
+
The name of the package to install.
|
360
|
+
|
361
|
+
#####`python_package_provider`
|
362
|
+
|
363
|
+
What provider should be used to install the package.
|
364
|
+
|
365
|
+
#####`ruby_package_ensure`
|
366
|
+
|
367
|
+
What to set the package to. Can be present, absent, or version.
|
368
|
+
|
369
|
+
#####`ruby_package_name`
|
370
|
+
|
371
|
+
The name of the package to install.
|
372
|
+
|
373
|
+
#####`ruby_package_provider`
|
374
|
+
|
375
|
+
What provider should be used to install the package.
|
376
|
+
|
377
|
+
####mysql::client
|
378
|
+
|
379
|
+
#####`bindings_enable`
|
380
|
+
|
381
|
+
Boolean to automatically install all bindings.
|
382
|
+
|
383
|
+
#####`package_ensure`
|
384
|
+
|
385
|
+
What to set the package to. Can be present, absent, or version.
|
386
|
+
|
387
|
+
#####`package_name`
|
388
|
+
|
389
|
+
What is the name of the mysql client package to install.
|
390
|
+
|
391
|
+
###Defines
|
392
|
+
|
393
|
+
####mysql::db
|
394
|
+
|
395
|
+
Creates a database with a user and assign some privileges.
|
396
|
+
|
397
|
+
```puppet
|
398
|
+
mysql::db { 'mydb':
|
399
|
+
user => 'myuser',
|
400
|
+
password => 'mypass',
|
401
|
+
host => 'localhost',
|
402
|
+
grant => ['SELECT', 'UPDATE'],
|
403
|
+
}
|
404
|
+
```
|
405
|
+
|
406
|
+
###Providers
|
407
|
+
|
408
|
+
####mysql_database
|
409
|
+
|
410
|
+
mysql_database can be used to create and manage databases within MySQL:
|
411
|
+
|
412
|
+
```puppet
|
413
|
+
mysql_database { 'information_schema':
|
414
|
+
ensure => 'present',
|
415
|
+
charset => 'utf8',
|
416
|
+
collate => 'utf8_swedish_ci',
|
417
|
+
}
|
418
|
+
mysql_database { 'mysql':
|
419
|
+
ensure => 'present',
|
420
|
+
charset => 'latin1',
|
421
|
+
collate => 'latin1_swedish_ci',
|
422
|
+
}
|
423
|
+
```
|
424
|
+
|
425
|
+
####mysql_user
|
426
|
+
|
427
|
+
mysql_user can be used to create and manage user grants within MySQL:
|
428
|
+
|
429
|
+
```puppet
|
430
|
+
mysql_user { 'root@127.0.0.1':
|
431
|
+
ensure => 'present',
|
432
|
+
max_connections_per_hour => '0',
|
433
|
+
max_queries_per_hour => '0',
|
434
|
+
max_updates_per_hour => '0',
|
435
|
+
max_user_connections => '0',
|
436
|
+
}
|
437
|
+
```
|
438
|
+
|
439
|
+
####mysql_grant
|
440
|
+
|
441
|
+
mysql_grant can be used to create grant permissions to access databases within
|
442
|
+
MySQL. To use it you must create the title of the resource as shown below,
|
443
|
+
following the pattern of `username@hostname/database.table`:
|
444
|
+
|
445
|
+
```puppet
|
446
|
+
mysql_grant { 'root@localhost/*.*':
|
447
|
+
ensure => 'present',
|
448
|
+
options => ['GRANT'],
|
449
|
+
privileges => ['ALL'],
|
450
|
+
table => '*.*',
|
451
|
+
user => 'root@localhost',
|
452
|
+
}
|
453
|
+
```
|
454
|
+
|
455
|
+
##Limitations
|
456
|
+
|
457
|
+
This module has been tested on:
|
458
|
+
|
459
|
+
* RedHat Enterprise Linux 5/6
|
460
|
+
* Debian 6/7
|
461
|
+
* CentOS 5/6
|
462
|
+
* Ubuntu 12.04
|
463
|
+
|
464
|
+
Testing on other platforms has been light and cannot be guaranteed.
|
465
|
+
|
466
|
+
#Development
|
467
|
+
|
468
|
+
Puppet Labs modules on the Puppet Forge are open projects, and community
|
469
|
+
contributions are essential for keeping them great. We can’t access the
|
470
|
+
huge number of platforms and myriad of hardware, software, and deployment
|
471
|
+
configurations that Puppet is intended to serve.
|
472
|
+
|
473
|
+
We want to keep it as easy as possible to contribute changes so that our
|
474
|
+
modules work in your environment. There are a few guidelines that we need
|
475
|
+
contributors to follow so that we can have a chance of keeping on top of things.
|
476
|
+
|
477
|
+
You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)
|
478
|
+
|
479
|
+
### Authors
|
480
|
+
|
481
|
+
This module is based on work by David Schmitt. The following contributor have contributed patches to this module (beyond Puppet Labs):
|
482
|
+
|
483
|
+
* Larry Ludwig
|
484
|
+
* Christian G. Warden
|
485
|
+
* Daniel Black
|
486
|
+
* Justin Ellison
|
487
|
+
* Lowe Schmidt
|
488
|
+
* Matthias Pigulla
|
489
|
+
* William Van Hevelingen
|
490
|
+
* Michael Arnold
|
491
|
+
* Chris Weyl
|
492
|
+
|