3 \�mek � @ s� U d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z ddlmZ ddl mZ ddlmZmZ dd lmZ d ZdZdZd ZdgZdddeeed�gedgd�Zeee�Z eje�Zeeefdd�Zeeeedd�dd�Z dS )z6 Mcollective: Install, configure and start mcollective� N)�dedent)� ConfigObj)�subp�util)�Cloud)�Config)� MetaSchema�get_meta_doc)�PER_INSTANCEz&/etc/mcollective/ssl/server-public.pemz'/etc/mcollective/ssl/server-private.pemz/etc/mcollective/server.cfga� This module installs, configures and starts mcollective. If the ``mcollective`` key is present in config, then mcollective will be installed and started. Configuration for ``mcollective`` can be specified in the ``conf`` key under ``mcollective``. Each config value consists of a key value pair and will be written to ``/etc/mcollective/server.cfg``. The ``public-cert`` and ``private-cert`` keys, if present in conf may be used to specify the public and private certificates for mcollective. Their values will be written to ``/etc/mcollective/ssl/server-public.pem`` and ``/etc/mcollective/ssl/server-private.pem``. .. note:: The ec2 metadata service is readable by non-root users. If security is a concern, use include-once and ssl urls. �allZcc_mcollectiveZMcollectivez(Install, configure and start mcollectivea� # Provide server private and public key and provide the following # config settings in /etc/mcollective/server.cfg: # loglevel: debug # plugin.stomp.host: dbhost # WARNING WARNING WARNING # The ec2 metadata service is a network service, and thus is # readable by non-root users on the system # (ie: 'ec2metadata --user-data') # If you want security for this, please use include-once + SSL urls mcollective: conf: loglevel: debug plugin.stomp.host: dbhost public-cert: | -------BEGIN CERTIFICATE-------- <cert data> -------END CERTIFICATE-------- private-cert: | -------BEGIN CERTIFICATE-------- <cert data> -------END CERTIFICATE-------- �mcollective)�id�name�title�description�distrosZexamplesZ frequencyZactivate_by_schema_keysc ! C s� y"t j|ddd�}ttj|��}W nD tk rf } z(|jtjkrD� ntj d|� t� }W Y d d }~X nX x�| j � D ]�\}}|dkr�t j||dd� ||d<