Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Edit file common.yaml
- iac_workshop/puppetlabs/code/environments/production/data/common.yaml needs two new lines.
- ```
- dnsserver : ‘8.8.4.4’
- searchdomain : ‘amazonaws.com’
- ```
- ## Create new Puppet Manifest
- iac_workshop/puppetlabs/code/environments/production/modules/profile/manifests/dns.pp`
- ```
- class dns {
- $dnsserver = hiera('dnsserver')
- $searchdomain = hiera('searchdomain')
- file { '/etc/resolv.conf':
- content => "search ${searchdomain}\n nameserver ${dnsserver}\n",
- }
- }
- ```
- ## Don't Forget to Update the Role
- Finally, we need to update the file iac_workshop/puppetlabs/code/environments/production/modules/role/manifest/iac_node.pp
- Add this line to the end:
- ```
- include profile::dns
- ```
- ## Check the Formatting
- ```
- puppet parser validate iac_node.pp
- puppet parser validate dns.pp
- puppet-lint -f iac-node.pp
- puppet-lint -f dns.pp
- ```
- ## Apply Puppet
Add Comment
Please, Sign In to add comment