Browse Source

Initial import

master
Mike Crosson 5 years ago
commit
c3bf3480bf
9 changed files with 796 additions and 0 deletions
  1. +202
    -0
      LICENSE-APACHE-2.0.txt
  2. +467
    -0
      LICENSE-CC-BY-SA-3.0.html
  3. +14
    -0
      README.md
  4. +28
    -0
      defaults/main.yml
  5. +18
    -0
      handlers/main.yml
  6. +32
    -0
      tasks/main.yml
  7. +5
    -0
      templates/client.cnf.j2
  8. +4
    -0
      templates/mysql_secure_installation.j2
  9. +26
    -0
      templates/mysqld.cnf.j2

+ 202
- 0
LICENSE-APACHE-2.0.txt View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

+ 467
- 0
LICENSE-CC-BY-SA-3.0.html View File

@ -0,0 +1,467 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
<title>Creative Commons Legal Code</title>
<meta http-equiv="content-type" content=
"text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href=
"https://creativecommons.org/includes/deed3.css" media="screen" />
<link rel="stylesheet" type="text/css" href=
"https://creativecommons.org/includes/deed3-print.css" media=
"print" />
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="https://creativecommons.org/includes/deed3-ie.css" media="screen" /><![endif]-->
<script type="text/javascript" src=
"https://creativecommons.org/includes/errata.js">
</script>
</head>
<body>
<p align="center" id="header"><a href=
"https://creativecommons.org/">Creative Commons</a></p>
<div id="deed" class="green">
<div id="deed-head">
<div id="cc-logo">
<img src=
"https://creativecommons.org/images/deed/cc-logo.jpg" alt=
"" />
</div>
<h1><span>Creative Commons Legal Code</span></h1>
<div id="deed-license">
<h2>Attribution-ShareAlike 3.0 United States</h2>
</div>
</div>
<div id="deed-main">
<div id="deed-main-content">
<img src=
"https://creativecommons.org/images/international/us.png"
alt="" />
<blockquote>
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES
NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE
DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE
COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS.
CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES
RESULTING FROM ITS USE.
</blockquote>
<h3><em>License</em></h3>
<p>THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS
OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR
"LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER
APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS
PROHIBITED.</p>
<p>BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU
ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE.
TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A
CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE
IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
CONDITIONS.</p>
<p><strong>1. Definitions</strong></p>
<ol type="a">
<li><strong>"Collective Work"</strong> means a work, such
as a periodical issue, anthology or encyclopedia, in
which the Work in its entirety in unmodified form, along
with one or more other contributions, constituting
separate and independent works in themselves, are
assembled into a collective whole. A work that
constitutes a Collective Work will not be considered a
Derivative Work (as defined below) for the purposes of
this License.</li>
<li><strong>"Creative Commons Compatible
License"</strong> means a license that is listed at
https://creativecommons.org/compatiblelicenses that has
been approved by Creative Commons as being essentially
equivalent to this License, including, at a minimum,
because that license: (i) contains terms that have the
same purpose, meaning and effect as the License Elements
of this License; and, (ii) explicitly permits the
relicensing of derivatives of works made available under
that license under this License or either a Creative
Commons unported license or a Creative Commons
jurisdiction license with the same License Elements as
this License.</li>
<li><strong>"Derivative Work"</strong> means a work based
upon the Work or upon the Work and other pre-existing
works, such as a translation, musical arrangement,
dramatization, fictionalization, motion picture version,
sound recording, art reproduction, abridgment,
condensation, or any other form in which the Work may be
recast, transformed, or adapted, except that a work that
constitutes a Collective Work will not be considered a
Derivative Work for the purpose of this License. For the
avoidance of doubt, where the Work is a musical
composition or sound recording, the synchronization of
the Work in timed-relation with a moving image
("synching") will be considered a Derivative Work for the
purpose of this License.</li>
<li><strong>"License Elements"</strong> means the
following high-level license attributes as selected by
Licensor and indicated in the title of this License:
Attribution, ShareAlike.</li>
<li><strong>"Licensor"</strong> means the individual,
individuals, entity or entities that offers the Work
under the terms of this License.</li>
<li><strong>"Original Author"</strong> means the
individual, individuals, entity or entities who created
the Work.</li>
<li><strong>"Work"</strong> means the copyrightable work
of authorship offered under the terms of this
License.</li>
<li><strong>"You"</strong> means an individual or entity
exercising rights under this License who has not
previously violated the terms of this License with
respect to the Work, or who has received express
permission from the Licensor to exercise rights under
this License despite a previous violation.</li>
</ol>
<p><strong>2. Fair Use Rights.</strong> Nothing in this
license is intended to reduce, limit, or restrict any
rights arising from fair use, first sale or other
limitations on the exclusive rights of the copyright owner
under copyright law or other applicable laws.</p>
<p><strong>3. License Grant.</strong> Subject to the terms
and conditions of this License, Licensor hereby grants You
a worldwide, royalty-free, non-exclusive, perpetual (for
the duration of the applicable copyright) license to
exercise the rights in the Work as stated below:</p>
<ol type="a">
<li>to reproduce the Work, to incorporate the Work into
one or more Collective Works, and to reproduce the Work
as incorporated in the Collective Works;</li>
<li>to create and reproduce Derivative Works provided
that any such Derivative Work, including any translation
in any medium, takes reasonable steps to clearly label,
demarcate or otherwise identify that changes were made to
the original Work. For example, a translation could be
marked "The original work was translated from English to
Spanish," or a modification could indicate "The original
work has been modified.";</li>
<li>to distribute copies or phonorecords of, display
publicly, perform publicly, and perform publicly by means
of a digital audio transmission the Work including as
incorporated in Collective Works;</li>
<li>to distribute copies or phonorecords of, display
publicly, perform publicly, and perform publicly by means
of a digital audio transmission Derivative Works.</li>
<li>
<p>For the avoidance of doubt, where the Work is a
musical composition:</p>
<ol type="i">
<li><strong>Performance Royalties Under Blanket
Licenses</strong>. Licensor waives the exclusive
right to collect, whether individually or, in the
event that Licensor is a member of a performance
rights society (e.g. ASCAP, BMI, SESAC), via that
society, royalties for the public performance or
public digital performance (e.g. webcast) of the
Work.</li>
<li><strong>Mechanical Rights and Statutory
Royalties</strong>. Licensor waives the exclusive
right to collect, whether individually or via a music
rights agency or designated agent (e.g. Harry Fox
Agency), royalties for any phonorecord You create
from the Work ("cover version") and distribute,
subject to the compulsory license created by 17 USC
Section 115 of the US Copyright Act (or the
equivalent in other jurisdictions).</li>
</ol>
</li>
<li><strong>Webcasting Rights and Statutory
Royalties</strong>. For the avoidance of doubt, where the
Work is a sound recording, Licensor waives the exclusive
right to collect, whether individually or via a
performance-rights society (e.g. SoundExchange),
royalties for the public digital performance (e.g.
webcast) of the Work, subject to the compulsory license
created by 17 USC Section 114 of the US Copyright Act (or
the equivalent in other jurisdictions).</li>
</ol>
<p>The above rights may be exercised in all media and
formats whether now known or hereafter devised. The above
rights include the right to make such modifications as are
technically necessary to exercise the rights in other media
and formats. All rights not expressly granted by Licensor
are hereby reserved.</p>
<p><strong>4. Restrictions.</strong> The license granted in
Section 3 above is expressly made subject to and limited by
the following restrictions:</p>
<ol type="a">
<li>You may distribute, publicly display, publicly
perform, or publicly digitally perform the Work only
under the terms of this License, and You must include a
copy of, or the Uniform Resource Identifier for, this
License with every copy or phonorecord of the Work You
distribute, publicly display, publicly perform, or
publicly digitally perform. You may not offer or impose
any terms on the Work that restrict the terms of this
License or the ability of a recipient of the Work to
exercise of the rights granted to that recipient under
the terms of the License. You may not sublicense the
Work. You must keep intact all notices that refer to this
License and to the disclaimer of warranties. When You
distribute, publicly display, publicly perform, or
publicly digitally perform the Work, You may not impose
any technological measures on the Work that restrict the
ability of a recipient of the Work from You to exercise
of the rights granted to that recipient under the terms
of the License. This Section 4(a) applies to the Work as
incorporated in a Collective Work, but this does not
require the Collective Work apart from the Work itself to
be made subject to the terms of this License. If You
create a Collective Work, upon notice from any Licensor
You must, to the extent practicable, remove from the
Collective Work any credit as required by Section 4(c),
as requested. If You create a Derivative Work, upon
notice from any Licensor You must, to the extent
practicable, remove from the Derivative Work any credit
as required by Section 4(c), as requested.</li>
<li>You may distribute, publicly display, publicly
perform, or publicly digitally perform a Derivative Work
only under: (i) the terms of this License; (ii) a later
version of this License with the same License Elements as
this License; (iii) either the Creative Commons
(Unported) license or a Creative Commons jurisdiction
license (either this or a later license version) that
contains the same License Elements as this License (e.g.
Attribution-ShareAlike 3.0 (Unported)); (iv) a Creative
Commons Compatible License. If you license the Derivative
Work under one of the licenses mentioned in (iv), you
must comply with the terms of that license. If you
license the Derivative Work under the terms of any of the
licenses mentioned in (i), (ii) or (iii) (the "Applicable
License"), you must comply with the terms of the
Applicable License generally and with the following
provisions: (I) You must include a copy of, or the
Uniform Resource Identifier for, the Applicable License
with every copy or phonorecord of each Derivative Work
You distribute, publicly display, publicly perform, or
publicly digitally perform; (II) You may not offer or
impose any terms on the Derivative Works that restrict
the terms of the Applicable License or the ability of a
recipient of the Work to exercise the rights granted to
that recipient under the terms of the Applicable License;
(III) You must keep intact all notices that refer to the
Applicable License and to the disclaimer of warranties;
and, (IV) when You distribute, publicly display, publicly
perform, or publicly digitally perform the Work, You may
not impose any technological measures on the Derivative
Work that restrict the ability of a recipient of the
Derivative Work from You to exercise the rights granted
to that recipient under the terms of the Applicable
License. This Section 4(b) applies to the Derivative Work
as incorporated in a Collective Work, but this does not
require the Collective Work apart from the Derivative
Work itself to be made subject to the terms of the
Applicable License.</li>
<li>If You distribute, publicly display, publicly
perform, or publicly digitally perform the Work (as
defined in Section 1 above) or any Derivative Works (as
defined in Section 1 above) or Collective Works (as
defined in Section 1 above), You must, unless a request
has been made pursuant to Section 4(a), keep intact all
copyright notices for the Work and provide, reasonable to
the medium or means You are utilizing: (i) the name of
the Original Author (or pseudonym, if applicable) if
supplied, and/or (ii) if the Original Author and/or
Licensor designate another party or parties (e.g. a
sponsor institute, publishing entity, journal) for
attribution ("Attribution Parties") in Licensor's
copyright notice, terms of service or by other reasonable
means, the name of such party or parties; the title of
the Work if supplied; to the extent reasonably
practicable, the Uniform Resource Identifier, if any,
that Licensor specifies to be associated with the Work,
unless such URI does not refer to the copyright notice or
licensing information for the Work; and, consistent with
Section 3(b) in the case of a Derivative Work, a credit
identifying the use of the Work in the Derivative Work
(e.g., "French translation of the Work by Original
Author," or "Screenplay based on original Work by
Original Author"). The credit required by this Section
4(c) may be implemented in any reasonable manner;
provided, however, that in the case of a Derivative Work
or Collective Work, at a minimum such credit will appear,
if a credit for all contributing authors of the
Derivative Work or Collective Work appears, then as part
of these credits and in a manner at least as prominent as
the credits for the other contributing authors. For the
avoidance of doubt, You may only use the credit required
by this Section for the purpose of attribution in the
manner set out above and, by exercising Your rights under
this License, You may not implicitly or explicitly assert
or imply any connection with, sponsorship or endorsement
by the Original Author, Licensor and/or Attribution
Parties, as appropriate, of You or Your use of the Work,
without the separate, express prior written permission of
the Original Author, Licensor and/or Attribution
Parties.</li>
</ol>
<p><strong>5. Representations, Warranties and
Disclaimer</strong></p>
<p>UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN
WRITING, LICENSOR OFFERS THE WORK AS-IS AND ONLY TO THE
EXTENT OF ANY RIGHTS HELD IN THE LICENSED WORK BY THE
LICENSOR. THE LICENSOR MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS,
IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT
LIMITATION, WARRANTIES OF TITLE, MARKETABILITY,
MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,
NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR
NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT
APPLY TO YOU.</p>
<p><strong>6. Limitation on Liability.</strong> EXCEPT TO
THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL
LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY
SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY
DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK,
EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p>
<p><strong>7. Termination</strong></p>
<ol type="a">
<li>This License and the rights granted hereunder will
terminate automatically upon any breach by You of the
terms of this License. Individuals or entities who have
received Derivative Works or Collective Works from You
under this License, however, will not have their licenses
terminated provided such individuals or entities remain
in full compliance with those licenses. Sections 1, 2, 5,
6, 7, and 8 will survive any termination of this
License.</li>
<li>Subject to the above terms and conditions, the
license granted here is perpetual (for the duration of
the applicable copyright in the Work). Notwithstanding
the above, Licensor reserves the right to release the
Work under different license terms or to stop
distributing the Work at any time; provided, however that
any such election will not serve to withdraw this License
(or any other license that has been, or is required to
be, granted under the terms of this License), and this
License will continue in full force and effect unless
terminated as stated above.</li>
</ol>
<p><strong>8. Miscellaneous</strong></p>
<ol type="a">
<li>Each time You distribute or publicly digitally
perform the Work (as defined in Section 1 above) or a
Collective Work (as defined in Section 1 above), the
Licensor offers to the recipient a license to the Work on
the same terms and conditions as the license granted to
You under this License.</li>
<li>Each time You distribute or publicly digitally
perform a Derivative Work, Licensor offers to the
recipient a license to the original Work on the same
terms and conditions as the license granted to You under
this License.</li>
<li>If any provision of this License is invalid or
unenforceable under applicable law, it shall not affect
the validity or enforceability of the remainder of the
terms of this License, and without further action by the
parties to this agreement, such provision shall be
reformed to the minimum extent necessary to make such
provision valid and enforceable.</li>
<li>No term or provision of this License shall be deemed
waived and no breach consented to unless such waiver or
consent shall be in writing and signed by the party to be
charged with such waiver or consent.</li>
<li>This License constitutes the entire agreement between
the parties with respect to the Work licensed here. There
are no understandings, agreements or representations with
respect to the Work not specified here. Licensor shall
not be bound by any additional provisions that may appear
in any communication from You. This License may not be
modified without the mutual written agreement of the
Licensor and You.</li>
</ol>
<!-- BREAKOUT FOR CC NOTICE. NOT A PART OF THE LICENSE -->
<blockquote>
<h3>Creative Commons Notice</h3>
<p>Creative Commons is not a party to this License, and
makes no warranty whatsoever in connection with the Work.
Creative Commons will not be liable to You or any party
on any legal theory for any damages whatsoever, including
without limitation any general, special, incidental or
consequential damages arising in connection to this
license. Notwithstanding the foregoing two (2) sentences,
if Creative Commons has expressly identified itself as
the Licensor hereunder, it shall have all rights and
obligations of Licensor.</p>
<p>Except for the limited purpose of indicating to the
public that the Work is licensed under the CCPL, Creative
Commons does not authorize the use by either party of the
trademark "Creative Commons" or any related trademark or
logo of Creative Commons without the prior written
consent of Creative Commons. Any permitted use will be in
compliance with Creative Commons' then-current trademark
usage guidelines, as may be published on its website or
otherwise made available upon request from time to time.
For the avoidance of doubt, this trademark restriction
does not form part of this License.</p>
<p>Creative Commons may be contacted at <a href=
"https://creativecommons.org/">https://creativecommons.org/</a>.</p>
</blockquote>
</div>
</div>
<div id="deed-foot">
<p id="footer"><a href="./">« Back to Commons Deed</a></p>
</div>
</div>
</body>
</html>

+ 14
- 0
README.md View File

@ -0,0 +1,14 @@
Description
-
A basic role for getting MariaDB (MySQL) up and running on most Linux distros
This role has been adapted from https://github.com/francisbesset/ansible-playbooks
Code License
-
All code is licensed under the Apache 2 License (http://www.apache.org/licenses/LICENSE-2.0)
Non-Code License
-
All non-code Assets, documentation, etc is licensed under the Creative Commons Attribution-ShareAlike 3.0 license (https://creativecommons.org/licenses/by-sa/3.0/us/)

+ 28
- 0
defaults/main.yml View File

@ -0,0 +1,28 @@
mysqld:
- socket: "/run/mysqld/mysqld.sock"
- bind-address: "127.0.0.1"
- port: 3306
- skip-external-locking:
- key_buffer_size: "16M"
- max_allowed_packet: "1M"
- table_open_cache: 64
- sort_buffer_size: "512K"
- net_buffer_length: "8K"
- read_buffer_size: "256K"
- read_rnd_buffer_size: "512K"
- myisam_sort_buffer_size: "8M"
- log-bin: "mysql-bin"
- binlog_format: "mixed"
- server-id: 1
- innodb_data_home_dir: "/var/lib/mysql"
- innodb_data_file_path: "ibdata1:10M:autoextend"
- innodb_log_group_home_dir: "/var/lib/mysql"
- innodb_buffer_pool_size: "16M"
- innodb_additional_mem_pool_size: "2M"
- innodb_log_file_size: "5M"
- innodb_log_buffer_size: "8M"
- innodb_flush_log_at_trx_commit: 1
- innodb_lock_wait_timeout: 50
mysqldump:
- quick:
- max_allowed_packet: "16M"

+ 18
- 0
handlers/main.yml View File

@ -0,0 +1,18 @@
---
- name: mysql_secure_installation
action: template src=mysql_secure_installation.j2 dest=/tmp/mysql_secure_installation owner=root group=root mode=0600
when: mysql_root_password is defined
notify:
- launch mysql_secure_installation
- delete mysql_secure_installation
- name: launch mysql_secure_installation
when: mysql_root_password is defined
action: shell cat /tmp/mysql_secure_installation | mysql_secure_installation
- name: delete mysql_secure_installation
when: mysql_root_password is defined
action: file dest=/tmp/mysql_secure_installation state=absent
- name: restart mysql
action: service name=mysqld state=restarted enabled=yes

+ 32
- 0
tasks/main.yml View File

@ -0,0 +1,32 @@
---
- name: download maria db (mysql) and clients
tags:
- pkg_download
yaourt: name={{ item }} download_only=yes
with_items:
- mariadb
- mariadb-clients
- name: install maria db (mysql) and clients
tags:
- pkg_install
pacman: name={{ item }} state=present
notify:
- mysql_secure_installation
with_items:
- mariadb
- mariadb-clients
- name: write config
tags:
- pkg_config
action: template src=mysqld.cnf.j2 dest=/etc/mysql/my.cnf
notify:
- restart mysql
- name: write client.cnf
tags:
- pkg_config
action: template src=client.cnf.j2 dest=/etc/mysql/client.cnf
notify:
- restart mysql

+ 5
- 0
templates/client.cnf.j2 View File

@ -0,0 +1,5 @@
[client]
{% if utf8 %}
# apply utf8
default-character-set = utf8
{% endif %}

+ 4
- 0
templates/mysql_secure_installation.j2 View File

@ -0,0 +1,4 @@
{{ mysql_root_password }}
{{ mysql_root_password }}

+ 26
- 0
templates/mysqld.cnf.j2 View File

@ -0,0 +1,26 @@
[mysqld]
{% if utf8 %}
# apply utf8
character-set-server = utf8
collation-server = utf8_unicode_ci
{% endif %}
{% if mysqld is not none %}
{% for item in mysqld %}
{% for key, value in item.iteritems() %}
{{ key }}{% if value is not none %}={{ value }}{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if mysqldump is not none %}
[mysqldump]
{% for item in mysqldump %}
{% for key, value in item.iteritems() %}
{{ key}}{% if value is not none%}={{ value}}{% endif %}
{% endfor %}
{% endfor %}
{% endif %}