Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.

Change in init.pp source_dir varaible #64

Open
wants to merge 32 commits into
base: fix-issue-13
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8898434
Release v2.1.4
alvagante Sep 10, 2014
1526112
Merge branch 'master' of https://github.com/example42/puppet-mysql
alvagante Sep 28, 2014
a6a18a6
Merge branch 'master' of https://github.com/example42/puppet-mysql
alvagante Oct 21, 2014
fcaaf41
Merge branch 'master' of https://github.com/example42/puppet-mysql
alvagante Nov 12, 2014
57e93a4
Fix #46 mysql::queryfile should be execute on remote server only when…
lermit Dec 29, 2014
3cb8c97
changed $mysql_db usage to $dbname
potfur Jan 18, 2015
50770cb
Merge pull request #55 from potfur/master
alvagante Jan 21, 2015
c327080
Merge branch 'master' of https://github.com/example42/puppet-mysql
alvagante Jan 22, 2015
0e04add
added some hiera integration
mburger Dec 9, 2014
cb9778a
switched from require to include to break the dependency cycle
mburger Dec 9, 2014
c2ca2c5
break cyclic dependency
Mar 11, 2015
437b6b3
convert the static root.my.cnf.erb template into a variable to allow …
mburger Mar 12, 2015
c557650
Update README.md to fix #57
Benjaminxreid Mar 12, 2015
c206f29
Trying to fix travis build
tiengo Mar 13, 2015
08fe850
Integrate MySQL module with Hiera and fix some lints
tiengo Mar 13, 2015
ec43f13
Merge pull request #58 from mburger/master
alvagante Mar 13, 2015
6a9369f
Merge pull request #59 from Benjaminxreid/Benjaminxreid-#57-patch-1
alvagante Mar 13, 2015
e499cd7
Merge branch 'master' of https://github.com/example42/puppet-mysql
alvagante Mar 13, 2015
109f10d
Merge branch 'master' of https://github.com/tiengo/puppet-mysql into …
alvagante Mar 13, 2015
6f9858e
t push origin masterMerge branch 'tiengo-master'
alvagante Mar 13, 2015
ea0dda8
Release v2.1.5
alvagante Apr 26, 2015
d52e47a
mysql: fix test for future parser.
gwarf Sep 25, 2015
5773c7d
mysql: address Alessandro comments on conditionals for future parser-…
gwarf Sep 29, 2015
6b458d2
Merge pull request #65 from gnubila-france/fix_future_parser_errors
alvagante Sep 29, 2015
eb76179
support for socket location in .my.cnf
tobixen Nov 13, 2015
436db6f
Merge pull request #68 from tobixen/bugfix_client_connection_details
alvagante Nov 16, 2015
a0057c6
Fixed the error by removing escape character.
BlurryFlurry Nov 19, 2015
bc949b8
Merge pull request #70 from BlurryFlurry/patch-1
alvagante Nov 19, 2015
f7342d7
Metadata.json removed from gitignore
alvagante Apr 15, 2016
b6fd0a7
Added github files
alvagante May 12, 2016
73da9f0
Added deprecation message
alvagante Aug 12, 2016
6f51c47
Release v2.1.8
alvagante Aug 12, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## How to Contribute to This Project

#### **Did You Find a Bug?**

* **Ensure the bug was not already reported** by searching on GitHub under **Issues**.
* If you're unable to find an open issue addressing the problem, **open a new one**. Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

#### **Did You Write a Patch That Fixes a Bug?**

* Open a new GitHub pull request with the patch.
1. Fork this project
1. Create your feature branch: `git checkout -b my-new-feature`
1. Commit your changes: `git commit -am 'Add some feature'`
1. Push to the branch: `git push origin my-new-feature`
1. Submit a pull request via GitHub's web interface
* Ensure the PR description clearly describes the problem and its solution. Include the relevant issue number if applicable.

#### **Do You Intend to Add a New Feature or Change an Existing One?**

* Suggest your change as a **new issue** using the label `enhancement` **BEFORE** you start writing code.

#### **Do You Want to Sponsor Open Source Development?**

If you need express resolution of a bug or new features you can consider the opportunity of **sponsoring** the relevant development.

* Open an issue on GitHub (of type `bug` or `enhancement`) with the details of what you want
* Contact [example42](http://www.example42.com/#contact) referring the issue you created
* Tell us how you want to sponsor the development (sending money, gifts or offering services)
* If we agree on the conditions we will place your [company] name in the module's Sponsors List

Thanks for contributing! :heart:
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Expected Behavior


## Actual Behavior


## Steps to Reproduce the Problem

1.
1.
1.

## Specifications

Please add this info:

1. Output of ```facter -p``` on the failing node (at least the OS related facts)
1. Version of Puppet and of the module
1. The relevant Puppet code and eventually Hiera data
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Before submitting your PR

1. Open an **issue** and refer to its number in your PR title
1. If it's a bug and you have the solution, go on with the PR!
1. If it's an enhancement, please wait for our feedback before starting to work on it
1. Please run ```puppet-lint``` on your code and ensure it's compliant

## After submitting your PR

1. Verify Travis checks and eventually fix the errors
1. Feel free to ping us if we don't reply promptly

13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
/.idea
/.gradle
/metadata.json
/.rvmrc
/_site
build
pkg/
coverage/
Session.vim
spec/fixtures
.*.sw[a-z]
Gemfile.lock
*.un~
/.vagrant
/vagrant/modules/public
.coveralls.yml
.bundle/
.yardoc/
doc/
vendor/
_site/
36 changes: 27 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,42 @@
language: ruby
bundler_args: --without development
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
script:
- "rake spec SPEC_OPTS='--format documentation'"
- "bundle exec rake validate lint spec SPEC_OPTS='--format documentation'"
env:
- PUPPET_VERSION="~> 2.6.0"
- PUPPET_VERSION="~> 2.7.0"
- PUPPET_VERSION="~> 3.0.0"
- PUPPET_VERSION="~> 3.1.0"
- PUPPET_VERSION="~> 3.2.0"
- PUPPET_VERSION="~> 3.3.0"
- PUPPET_VERSION="~> 3.4.0"
- PUPPET_VERSION="~> 3.5.0"
- PUPPET_VERSION="~> 3.6.0"
- PUPPET_VERSION="~> 3.7.0"
matrix:
exclude:
# fails on can't convert String into Integer at init.pp:284
# fqdn_rand patch in
- rvm: 1.9.3
env: PUPPET_VERSION="~> 2.6.0"
gemfile: .gemfile.travis
- rvm: 1.9.3
env: PUPPET_VERSION="~> 2.7.0"
gemfile: .gemfile.travis

gemfile: .gemfile
# fails on "Could not autoload package: constant Puppet::Type::Package"
- rvm: 2.0.0
env: PUPPET_VERSION="~> 3.1.0"
# fails on iconv couldn't be loaded, which is required for UTF-8/UTF-16 conversions
- rvm: 2.0.0
env: PUPPET_VERSION="~> 2.7.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 2.7.0"
# fails on "can't modify frozen Symbol"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.1.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.2.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.3.0"
notifications:
email:
- [email protected]
17 changes: 17 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source 'https://rubygems.org'

puppetversion = ENV['PUPPET_VERSION']

is_ruby18 = RUBY_VERSION.start_with? '1.8'

if is_ruby18
gem 'rspec', "~> 3.1.0", :require => false
end
gem 'puppet', puppetversion, :require => false
gem 'puppet-lint'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'rspec-puppet'

group :development do
gem 'puppet-blacksmith'
end
13 changes: 0 additions & 13 deletions Modulefile

This file was deleted.

39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Deprecation notice

This module was designed for Puppet versions 2 and 3. It should work also on Puppet 4 but doesn't use any of its features.

The current Puppet 3 compatible codebase is no longer actively maintained by example42.

Still, Pull Requests that fix bugs or introduce backwards compatible features will be accepted.


# Puppet module: mysql

This is a Puppet mysql module from the second generation of Example42 Puppet Modules.
Expand Down Expand Up @@ -35,7 +44,7 @@ For detailed info about the logic and usage patterns of Example42 modules read R
The simplest way to create database is the following.

mysql::grant { 'db1':
mysql_username => 'myusername',
mysql_user => 'myusername',
mysql_password => 'mypassword',
}

Expand All @@ -45,7 +54,7 @@ This will create a MySQL database named 'db1' with a MySQL grant allowing full a
If you want to customize the host the new user can connect from you have to use the 'mysql\_host'.

mysql::grant { 'db1':
mysql_username => 'myusername',
mysql_user => 'myusername',
mysql_password => 'mypassword',
mysql_host => '10.42.42.0/255.255.255.0',
}
Expand All @@ -56,7 +65,7 @@ Here the whole 10.42.42.0/24 can connect.
For privileges customization there is the 'mysql\_privileges' parameter.

mysql::grant { 'db1':
mysql_username => 'myusername',
mysql_user => 'myusername',
mysql_password => 'mypassword',
mysql_privileges => 'SELECT',
}
Expand All @@ -68,7 +77,7 @@ Like for standard puppet resource you can use the 'ensure' parameter in order to

mysql::grant { 'db1':
ensure => 'absent',
mysql_username => 'myusername',
mysql_user => 'myusername',
mysql_password => 'mypassword',
}

Expand All @@ -79,7 +88,7 @@ The mysql\_db\_init\_query\_file is an optional parameter allowing to specify a

mysql::grant { 'db1':
ensure => 'absent',
mysql_username => 'myusername',
mysql_user => 'myusername',
mysql_password => 'mypassword',
mysql_db_init_query_file => '/full/path/to/the/schema.sql',
}
Expand Down Expand Up @@ -161,6 +170,26 @@ __NOTE__: The SQL file should already be uploaded on mysql server host.
my_class => 'mysql::example42',
}

## USAGE - Hiera Support
* Manage MySQL configuration using Hiera

```yaml
mysql::template: 'modules/mysql/my.cnf.erb'
mysql::root_password: 'example42'
mysql::options:
port: '3306'
bind-address: '127.0.0.1'
```

* Defining MySQL resources using Hiera

```yaml
mysql::grant_hash:
'db1':
mysql_user: 'myusername'
mysql_password: 'mypassword'
mysql_host: '10.42.42.0/255.255.255.0'
```

## USAGE - Example42 extensions management
* Activate puppi (recommended, but disabled by default)
Expand Down
16 changes: 10 additions & 6 deletions manifests/grant.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
) {

if $remote_host == '' {
require mysql
include mysql
}

$dbname = $mysql_db ? {
Expand Down Expand Up @@ -90,6 +90,11 @@
default => any2bool($mysql_create_db)
}

$manage_remote_host = $remote_host ? {
'' => 'localhost',
default => $remote_host,
}

if (!defined(File[$mysql_grant_filepath])) {
file { $mysql_grant_filepath:
ensure => directory,
Expand Down Expand Up @@ -125,7 +130,6 @@
default => undef,
}


exec { "mysqlgrant-${mysql_user}-${nice_mysql_host}-${dbname}":
command => $exec_command,
require => $exec_require,
Expand All @@ -137,10 +141,10 @@
if $mysql_db_init_query_file != '' and $mysql_create_db == true {
mysql::queryfile { "mysql_db_init_query_file-${nice_mysql_host}-${dbname}":
mysql_file => $mysql_db_init_query_file,
mysql_user => $mysql_user,
mysql_password => $mysql_password,
mysql_db => $mysql_db,
mysql_host => $mysql_host,
mysql_user => $remote_user,
mysql_password => $remote_password,
mysql_db => $dbname,
mysql_host => $manage_remote_host,
subscribe => Exec["mysqlgrant-${mysql_user}-${nice_mysql_host}-${dbname}"],
}
}
Expand Down
Loading