Last active
March 8, 2018 19:43
-
-
Save sirbrillig/5406014 to your computer and use it in GitHub Desktop.
Puppet Wordpress manifest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group { "puppet": | |
ensure => "present", | |
} | |
File { owner => 0, group => 0, mode => 0644 } | |
file { '/etc/motd': | |
content => "Welcome to your Vagrant-built virtual machine! Managed by Puppet.\n" | |
} | |
class ntp { | |
package { | |
"ntp": | |
ensure => installed | |
} | |
service { "ntp": | |
ensure => running, | |
} | |
} | |
class { 'vim': } | |
class { 'mysql': } | |
class { 'mysql::server': } | |
class { 'wordpress': } | |
class { 'apache': } | |
class { 'apache::mod::php': } | |
class { 'mysql::php': } | |
apache::vhost { 'wordpress.local': | |
priority => '10', | |
vhost_name => '192.168.2.109', # CHANGE ME TO THE HOST IP/NAME | |
port => '80', | |
docroot => '/opt/wordpress/', | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forge "http://forge.puppetlabs.com" | |
mod 'hunner/wordpress' | |
mod 'puppetlabs/apache' | |
mod 'b0d0nne11/vim' |
With the latest modules this works on centos7:
group { "puppet":
ensure => "present",
}
File { owner => 0, group => 0, mode => '0644' }
file { '/etc/motd':
content => "Welcome to your Vagrant-built virtual machine! Managed by Puppet.\n"
}
class ntp {
package {
"ntp":
ensure => installed
}
service { "ntp":
ensure => running,
}
}
class { 'vim': }
class { 'mysql::client': }
class { 'mysql::server': }
class { 'apache': }
class { 'apache::mod::php': }
class { 'mysql::bindings::php': }
apache::vhost { 'wordpress.local':
priority => '10',
vhost_name => $::ipaddress,
port => '80',
docroot => '/opt/wordpress/',
docroot_owner => 'apache',
docroot_group => 'apache',
}
class { 'wordpress':
version => '4.9.4',
wp_owner => 'apache',
wp_group => 'apache',
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implies puppet, librarian-puppet.