ó òaXc@sñdZddlZddlZddlZddlmZddlmZddlmZddlZdZ e ddd d d d gƒZ e dgƒZ d Z dZdZdZi dd6dd6dd6ed6dd6ed6d d6d d6dd6ed6ZedgƒZedddddddgƒZeejƒƒZejeƒejeƒejd d!d"d#gƒeeƒZd$Zd%Ze d&d'd(d)d*gƒZd+„Zd,„Zd-„Zd.„Z d/„Z!d0„Z"d1„Z#d2„Z$dS(3s **Summary:** module that configures, starts and installs chef. **Description:** This module enables chef to be installed (from packages or from gems, or from omnibus). Before this occurs chef configurations are written to disk (validation.pem, client.pem, firstboot.json, client.rb), and needed chef folders/directories are created (/etc/chef and /var/log/chef and so-on). Then once installing proceeds correctly if configured chef will be started (in daemon mode or in non-daemon mode) and then once that has finished (if ran in non-daemon mode this will be when chef finishes converging, if ran in daemon mode then no further actions are possible since chef will have forked into its own process) then a post run function can run that can do finishing activities (such as removing the validation pem file). It can be configured with the following option structure:: chef: directories: (defaulting to /etc/chef, /var/log/chef, /var/lib/chef, /var/cache/chef, /var/backups/chef, /var/run/chef) validation_key or validation_cert: (optional string to be written to /etc/chef/validation.pem) firstboot_path: (path to write run_list and initial_attributes keys that should also be present in this configuration, defaults to /etc/chef/firstboot.json) exec: boolean to run or not run chef (defaults to false, unless a gem installed is requested where this will then default to true) chef.rb template keys (if falsey, then will be skipped and not written to /etc/chef/client.rb) chef: client_key: environment: file_backup_path: file_cache_path: json_attribs: log_level: log_location: node_name: pid_file: server_url: show_time: ssl_verify_mode: validation_key: validation_name: iÿÿÿÿN(t templater(t url_helper(tutils1.8s /etc/chefs /var/log/chefs /var/lib/chefs/var/cache/chefs/var/backups/chefs /var/run/chefs'https://www.getchef.com/chef/install.shis/etc/chef/validation.pems/etc/chef/firstboot.jsons :verify_nonetssl_verify_modes:infot log_levels/var/log/chef/client.logt log_locationtvalidation_keys/etc/chef/client.pemt client_keyt json_attribstfile_cache_pathtfile_backup_paths/var/run/chef/client.pidtpid_filet show_timet server_urlt node_namet environmenttvalidation_names/etc/chef/client.rbs/usr/bin/chef-clients-ds-it1800s-st20cCs3tjjtƒstStjttjƒs/tStS(N(tostpathtisfiletCHEF_EXEC_PATHtFalsetaccesstX_OKtTrue(((sE/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_chef.pyt is_installedŒs cCsDtj|ddtƒ}|r@tjjtƒr@tjtƒndS(Ntdelete_validation_post_exectdefault(Rtget_cfg_option_boolRRRRtCHEF_VALIDATION_PEM_PATHtunlink(tchef_cfgtlogt delete_pem((sE/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_chef.pyt post_run_chef”s   cCstjƒ}x|jƒD]‚\}}|tkrG|jd|ƒqn|dkr`d||Esz                H  #