Bug 1290076
Summary: | mymodule class example has no httpd_port parameter | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Stephen Wadeley <swadeley> |
Component: | Docs Puppet Guide | Assignee: | Dan Macpherson <dmacpher> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Stephen Wadeley <swadeley> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1.4 | CC: | adahms, amankumb, dmacpher, snag, swadeley, vgunasek |
Target Milestone: | Unspecified | Keywords: | Documentation |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-09-21 07:34:09 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stephen Wadeley
2015-12-09 15:56:44 UTC
PixelDrift.NET Support wrote: To follow up on the 'mymodule' example Puppet module problems, here is an example of the issue. I have created a basic manifest to run locally that triggers an exec in the same way as the sample module (httpd_port variable provided inline rather than a parameter, but same outcome). $httpd_port = 4000 package { "httpd": ensure => installed, } exec { "firewall-cmd ${httpd_port}": command => "/bin/echo \"this message in place of iptables\"", refreshonly => true, subscribe => Package['httpd'], } Results from the first run are in the below code block. httpd is installed and exec fires because state of 'httpd' package changes from not installed to installed. [root@cupcake ~]# puppet apply mymodule.pp Notice: Compiled catalog for cupcake.pixeldrift.local in environment production in 0.40 seconds Notice: /Stage[main]/Main/Package[httpd]/ensure: created Notice: /Stage[main]/Main/Exec[firewall-cmd 4000]: Triggered 'refresh' from 1 events Notice: Finished catalog run in 10.15 seconds Now that the package is installed, the Exec will no longer fire, so the firewall port will never be updated. To demonstrate this, you can change the httpd_port variable at the start of the mymodule.pp file, eg. $httpd_port = 3000 Now when you re-run the script the Exec (firewall) update won't occur because the httpd package is already installed even though the variable/parameter has changed. [root@cupcake ~]# puppet apply mymodule.pp Notice: Compiled catalog for cupcake.pixeldrift.local in environment production in 0.39 seconds Notice: Finished catalog run in 0.53 seconds This problem exists for both the firewall and semanage commands in the example mymodule Puppet module. I think the example needs reworking. --------------------------- Source: https://access.redhat.com/discussions/1987953#comment-994733 Hello These changes are now live on the customer portal. For 6.1 https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.1/html-single/Puppet_Guide/index.html#sect-Red_Hat_Satellite-Puppet_Guide-Building_Puppet_Modules_from_Scratch-Configuring_the_HTTP_Server For 6.2 https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/puppet-guide/26-configuring-the-http-server Thank you *** Bug 1273743 has been marked as a duplicate of this bug. *** |