GithubHelp home page GithubHelp logo

puppet-specifications's Introduction

Puppet Specifications

This repository contains specifications for the project Puppet, and related technologies.

Puppet Language Specification

The Puppet Programming Language Specification is a specification of the Puppet Programming Language. The first published release of this specification specifies the language version 4.

The version 4.0.0 is the first version of the specification (this to make it harmonize with the 4.0.0 release of Puppet). From that point, the intention is to keep the same specification version even if the minor version of the implementation changes (i.e. for other reasons that the specification has changed). When a specification change is made, it may skip several numbers to again harmonize with the Puppet implementation version number.

Until Puppet 4.0 was released, there was just the "current" and "future" implementations of the language. As time goes on it will be impossible to use only those words as their meaning is relative to a particular release of puppet (the future in 3.6 is not the same as the future in 3.7, and again not the same as current in 4.0) - hence the need for a separate version of the specification.

The Puppet Project is the reference implementation of the specification.

Semantic Versioning

The specifications follows semantic versioning with the following semantics:

  • The micro version contains corrections, clarifications of the specification. All implementation of the specification that are compliant with the same minor version are also compliant with all micro versions of the same minor version.
  • The minor versions contains changes that are non breaking. But an implementation that is compliant with a previous minor versions is not automatically compliant with all future minor versions for the same major version.
  • The major versions contains changes that are breaking. An implementation that is compliant with an earlier major version can not be compliant with a major specification change. (It may offser compliance with multiple versions of the specification via the use of feature flags).

Index

puppet-specifications's People

Contributors

adreyer avatar ariaxli avatar caseywilliams avatar clairecadman avatar da-ar avatar david22swan avatar davidmalloncares avatar davids avatar donoghuc avatar ferventcoder avatar fiddyspence avatar glennsarti avatar haus avatar hlindberg avatar iristyle avatar joshcooper avatar lucywyman avatar magisus avatar melissa avatar mikaelsmith avatar mruzicka avatar nicklewis avatar nrwahl2 avatar richardc avatar rlinehan avatar scottgarman avatar smcclellan avatar steveax avatar thallgren avatar zaphod42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-specifications's Issues

Define Type Algebra

Since we're defining EBNF, we should — for completeness — define the Type Algebra also. The meaning of

T ∪  T            →  T

may not be clear to anyone who's CS education either is incomplete, or a (couple of) decade(s) in the past.

Clarification on resource api's :is key

If the :is value is nil, the resources were not found by get.

Clear enough. The resource isn't there and needs to run through create

If there is no :is key, the runtime did not have a cached state available.

I'm not sure what this is supposed to mean. Does this mean it doesn't show up as a resource but that the resource might actually be there? If that's the case, I don't know what set is supposed to do about it. Can someone please clarify? Thanks!

Could not evaluate: undefined method `strip!'

Hello,

Could you please advise what could be a reason for error: undefined method `strip!'
example class:
$test = " t1 "
$test1 = strip("$test")
$test2 = $test.strip
notice("test: ${test}")
notice("test1: ${test1}")
notice("test2: ${test2}")
augeas { "sshd_config":
context => "/files/ssh/sshd_config",
changes => [
"set /files/etc/ssh/sshd_config/PermitRootLogin yes",
onlyif => "match *[. = 'PermitRootLogin'] == 'no'",
],
}

output:
puppet apply:
Notice: Scope(Class[Inf_ldap::S]): test: t1
Notice: Scope(Class[Inf_ldap::S]): test1: t1
Notice: Scope(Class[Inf_ldap::S]): test2: t1
Notice: Compiled catalog for orcpuit14 in environment dev in 0.14 seconds
Info: Applying configuration version '1550482520'
Error: /Stage[main]/Inf_ldap::S/Augeas[sshd_config]: Could not evaluate: undefined method `strip!' for {"onlyif"=>"match *[. = 'PermitRootLogin'] == 'no'"}:Hash

Function strip works, but not for augeas.
That is default installation of puppet-agent-6.2.0-1.el7.x86_64 on RH7.
vendormoduledir = /opt/puppetlabs/puppet/vendor_modules
strip function file comes with puppet agent:
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/functions/strip.rb

--
Regards,
Hubert

clarify PATH expectations tasks should have

At present there is no mention of what should and should not be in the PATH for tasks to rely on, the Apache task has this:

https://github.com/puppetlabs/puppetlabs-apache/blob/e587f2af793111adab04bb776808f99a09ca092b/tasks/init.rb#L8

Here it relies on facter being in the path which only works in PE because apparently PE links facter to /usr/local/bin - something puppet-agent does not do.

It probably works under ssh bolt because that reads the profile files that may or may not exist on the node

It all kind of seems to work by accident rather than clear specification.

A quick chat on Slack about this suggested that probably tasks should not expect PATH to have anything and should use full paths for most things like here:

https://github.com/puppetlabs/puppetlabs-facter_task/blob/32658a05a6080c35505267184b9a14a1ef6d8768/tasks/init.rb#L21

Regexp[pattern] semantic issue

If an attempt is used to specify options, this will result in an error (e.g. /.*/m).

should be

If an attempt is made to specify options, this will result in an error (e.g. /.*/m).

document that all class and definition parameters are available as local variables (including meta parameters)

Adam Vinsh from the Puppet OpenStack module community brought up in IRC this morning that they discovered that they could use $require in the local scope of a defined type[1].

This got me wondering how local variables are generated from parameters and specifically how this intertwines with meta parameters. I was able to follow a path in the Puppet source that seemed to validate that all parameters of a resource are added to parameter scope[2] and that parameter scope will eventually make it into local scope by virtual of traveling through ephemeral scope[3]. Combine this with the specification that meta parameters are available in parameter scope[4] and it seems that you have an implicit behavior that one should expect that all meta parameters and their values are available in local scope.

[1] https://review.openstack.org/#/c/378950/10/manifests/service.pp
[2] https://github.com/puppetlabs/puppet/blob/master/lib/puppet/resource/type.rb#L347-L387
[3] https://github.com/puppetlabs/puppet/blob/master/lib/puppet/parser/scope.rb#L928
[4] https://github.com/puppetlabs/puppet-specifications/blob/master/language/parameter_scope.md#meta-parameters-are-available-in-parameter-scope

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.