%PDF- %PDF-
Direktori : /proc/self/root/usr/lib/python2.7/site-packages/cloudinit/config/ |
Current File : //proc/self/root/usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.pyo |
� oB�]c @ s� d Z d d l m Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d Z d Z d Z d Z d e f d � � YZ d � Z d � Z d S( s_ Puppet ------ **Summary:** install, configure and start puppet This module handles puppet installation and configuration. If the ``puppet`` key does not exist in global configuration, no action will be taken. If a config entry for ``puppet`` is present, then by default the latest version of puppet will be installed. If ``install`` is set to ``false``, puppet will not be installed. However, this will result in an error if puppet is not already present on the system. The version of puppet to be installed can be specified under ``version``, and defaults to ``none``, which selects the latest version in the repos. If the ``puppet`` config key exists in the config archive, this module will attempt to start puppet even if no installation was performed. The module also provides keys for configuring the new puppet 4 paths and installing the puppet package from the puppetlabs repositories: https://docs.puppet.com/puppet/4.2/reference/whered_it_go.html The keys are ``package_name``, ``conf_file``, ``ssl_dir`` and ``csr_attributes_path``. If unset, their values will default to ones that work with puppet 3.x and with distributions that ship modified puppet 4.x that uses the old paths. Puppet configuration can be specified under the ``conf`` key. The configuration is specified as a dictionary containing high-level ``<section>`` keys and lists of ``<key>=<value>`` pairs within each section. Each section name and ``<key>=<value>`` pair is written directly to ``puppet.conf``. As such, section names should be one of: ``main``, ``master``, ``agent`` or ``user`` and keys should be valid puppet configuration options. The ``certname`` key supports string substitutions for ``%i`` and ``%f``, corresponding to the instance id and fqdn of the machine respectively. If ``ca_cert`` is present, it will not be written to ``puppet.conf``, but instead will be used as the puppermaster certificate. It should be specified in pem format as a multi-line string (using the ``|`` yaml notation). Additionally it's possible to create a csr_attributes.yaml for CSR attributes and certificate extension requests. See https://puppet.com/docs/puppet/latest/config_file_csr_attributes.html **Internal name:** ``cc_puppet`` **Module frequency:** per instance **Supported distros:** all **Config keys**:: puppet: install: <true/false> version: <version> conf_file: '/etc/puppet/puppet.conf' ssl_dir: '/var/lib/puppet/ssl' csr_attributes_path: '/etc/puppet/csr_attributes.yaml' package_name: 'puppet' conf: agent: server: "puppetmaster.example.org" certname: "%i.%f" ca_cert: | -------BEGIN CERTIFICATE------- <cert data> -------END CERTIFICATE------- csr_attributes: custom_attributes: 1.2.840.113549.1.9.7: 342thbjkt82094y0uthhor289jnqthpc2290 extension_requests: pp_uuid: ED803750-E3C7-44F5-BB08-41A04433FE2E pp_image_name: my_ami_image pp_preshared_key: 342thbjkt82094y0uthhor289jnqthpc2290 i����( t StringION( t helpers( t utils /etc/puppet/puppet.confs /var/lib/puppet/ssls /etc/puppet/csr_attributes.yamlt puppett PuppetConstantsc B s e Z d � Z RS( c C sR | | _ | | _ t j j | d � | _ t j j | j d � | _ | | _ d S( Nt certss ca.pem( t conf_patht ssl_dirt ost patht joint ssl_cert_dirt ssl_cert_patht csr_attributes_path( t selft puppet_conf_filet puppet_ssl_dirR t log( ( s>