Your mission for today is to use Puppet to install the Nginx web server and deploy a holding page for the cat-pictures.com
website. Let's start by recalling what your Puppet directory structure should look like, as shown in the following diagram:
Edit the
nodes.pp
file so it looks like this:node 'demo' { package { 'nginx': ensure => installed, } }
Run Puppet:
ubuntu@demo:~/puppet$ sudo puppet apply manifests/site.pp Notice: /Stage[main]//Node[demo]/Package[nginx]/ensure: ensure changed 'purged' to 'present' Notice: Finished catalog run in 3.10 seconds
Let's look at the preceding code in detail:
node 'demo' { ... }
Remember that the node
keyword introduces a node declaration, a list of resources that are to be applied only to node demo
.
package { 'nginx': ensure => installed, }
In this case, there is one resource, of type package
. As with the file
resource we created...