Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Allow database port to be set in the database_profile #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
}
Wordpress_app::Database produces Database {
host => $::fqdn,
port => '3306',
port => $wordpress_app::database_profile::port,
provider => 'tcp',
}
7 changes: 4 additions & 3 deletions manifests/database_profile.pp
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
class wordpress_app::database_profile (
String $bind_address = '0.0.0.0',
String $port = '3306',
) {
class { 'mysql::server':
override_options => {
'mysqld' => {
'bind_address' => '0.0.0.0',
'port' => '3306',
'port' => $port,
},
},
}
firewall { '3306 allow apache-mysql':
dport => ['3306'],
firewall { '${port} allow apache-mysql':
dport => [$port],
proto => tcp,
action => accept,
}
Expand Down