diff --git a/manifests/database.pp b/manifests/database.pp index 1f64f9d..00d72e0 100644 --- a/manifests/database.pp +++ b/manifests/database.pp @@ -38,6 +38,6 @@ } Wordpress_app::Database produces Database { host => $::fqdn, - port => '3306', + port => $wordpress_app::database_profile::port, provider => 'tcp', } diff --git a/manifests/database_profile.pp b/manifests/database_profile.pp index 22e0eeb..b305fcc 100644 --- a/manifests/database_profile.pp +++ b/manifests/database_profile.pp @@ -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, }