Our myapp defined type will make use of the db resource we created in the previous section, passing four values to PuppetDB, directly from myapp::db. We'll use this manifest to build a MySQL server, and provide information to our WordPress instance on another node. Notice the following in the example:
- A regular defined type, with standard Puppet DSL. We build a server and a database to support the app.
- $host is not used in the manifest, but is passed along to the produced Db resource.
- Myapp::Db produces Db is placed directly after the define, in the same manifest:
define myapp::db ( $dbuser, $dbpass, $host = $::fqdn,){ class {'::mysql::server': root_password => 'Sup3rp@ssword!', override_options => { 'mysqld' => { ...