8000 GitHub - trlinkin/trlinkin-noop at 0.1.0 · GitHub
[go: up one dir, main page]

Skip to content
  • About

    Puppet DSL 'noop' function. This allows every resource in the containing scope to be set to noop by default.

    Resources

    Stars

    18 stars

    Watchers

    3 watching

    Forks

    Latest commit

     

    History

    37 Commits

    Folders and files

    Repository files navigation

    Noop

    Build Status

    A Puppet DSL noop() function for setting a whole scope to noop.

    Usage

    This is a statement function that accepts one optional Boolean argument. It can be called at any scope. Its effects will propagate into child scopes.

    class ssh {
    
      noop()
      include ssh::client
    
      package { 'openssh-server' :
        ensure => installed,
      }
    
      file { '/etc/ssh/sshd_config':
        ensure => file,
      }
    
      service { 'sshd':
        ensure  => running,
        require => Package['openssh-server'],
      }
    }
    
    class ssh::client {
      noop(false)
    
      file { '/etc/ssh/ssh_config':
        ensure => file,
      }
    }

    In the above example, none of the resources in Class['ssh'] will be enforced but the resources in Class['ssh::client'] WILL be enforced because the default noop value is reset to false in the child's scope. Without noop(false) in Class['ssh::client'], the parent scope's default noop value (as set with the noop() function) would be inherited.

    License

    Copyright 2012 Thomas Linkin tom@puppetlabs.com

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0
    

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    About

    Puppet DSL 'noop' function. This allows every resource in the containing scope to be set to noop by default.

    Resources

    Stars

    18 stars

    Watchers

    3 watching

    Forks

    Releases

    Packages

    Used by

    Contributors

    Languages

    0