Created
January 30, 2012 23:54
-
-
Save techieBrandon/1707632 to your computer and use it in GitHub Desktop.
/etc/puppet/manifests/site.pp
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
| bwilburn@puppet-target:~$ sudo puppet agent --test --onetime | |
| err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type class at /etc/puppet/manifests/nodes.pp:7 on node puppet-target.sauce.net |
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
| node 'puppet-target.secret.net' { | |
| class { | |
| ["monit::cleaner"]: stage => "prior_release_cleanup"; | |
| } | |
| class { | |
| ["mysql", "apache2", "redis", "solr", "resque", "embedded_jira", "monit"]: stage => "pre_release_migrator"; | |
| } | |
| class { | |
| ["sauce"]: stage => "release_migrator"; | |
| } | |
| } |
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
| stage { | |
| "prior_release_cleanup": ; | |
| "pre_release_migrator": ; | |
| "release_migrator": ; | |
| "post_release_migrator": ; | |
| "release_final": ; | |
| "postmortem": ; | |
| } | |
| Stage["prior_release_cleanup"] -> Stage["pre_release_migrator"] -> Stage["release_migrator"] -> Stage["post_release_migrator"] -> Stage["release_final"] -> Stage | |
| ["postmortem"] | |
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
| class cleaner { | |
| #remove file from 2.0.2 naming conventions | |
| file {'/etc/monit/conf.d/sauce': | |
| path => '/etc/monit/conf.d/sauce', | |
| ensure => absent, | |
| before => Service['monit_2.0.2'], | |
| tag => ['2.0.2_cleanup', 'cleanup'], | |
| } | |
| #remove file from 2.0.3.[1..3] naming conventions | |
| file {'/etc/monit/conf.d/sauce2.0.3': | |
| path => '/etc/monit/conf.d/sauce2.0.3', | |
| ensure => absent, | |
| before => Service['monit_2.0.3..2'], | |
| tag => ['2.0.3_cleanup', '2.0.3.1_cleanup', '2.0.3.2_cleanup', 'cleanup'], | |
| } | |
| service {['monit_2.0.2', 'monit_2.0.3..2']: | |
| provider => 'init', | |
| path => '/etc/init.d/monit', | |
| ensure => 'stopped', | |
| } | |
| } |
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
| class monit { | |
| include monit::params | |
| include monit::cleaner | |
| $version = $monit::params::version | |
| package { 'monit': | |
| ensure => installed, | |
| } | |
| ....boring stuff that works... | |
| } |
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
| bwilburn@puppetmaster:~$ ls /etc/puppet/manifests/ | |
| modules.pp nodes.pp site.pp | |
| bwilburn@puppetmaster:~$ ls /etc/puppet/modules/monit/ | |
| manifests metadata.json Modulefile README spec templates tests | |
| bwilburn@puppetmaster:~$ ls /etc/puppet/modules/monit/manifests/ | |
| cleaner.pp init.pp monit | |
| bwilburn@puppetmaster:~$ ls /etc/puppet/modules/monit/manifests/monit/ | |
| params.pp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment