Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/cloudinit/config/__pycache__/ |
Upload File : |
3 ?q,d�? � @ s� U d Z ddlZddlZddlZddlmZ ddlmZmZm Z m Z mZ ddlm Z mZ ddlmZ dZedd d ddd g�Zedg�ZdZdZdZdZdZdZdddeddedddddd�Zedg�Zeddddd d!d"g�Zeej � �Z!e!j"e� e!j"e� e!j"d#d$d%d&d'g� ee!�Z!d(Z#d)Z$ed*d+d,d-d.g�Z%eZ&d/gZ'd0d1d2ed3�e'ed4�ge&d5�Z(e (ee(�Z d6d7� Z)d8d9� Z*d:d;� Z+d<d=� Z,d>d?� Z-dHd@dA�Z.dBdC� Z/dDdE� Z0dFdG� Z1dS )IaD Chef ---- **Summary:** module that configures, starts and installs chef. 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). **Internal name:** ``cc_chef`` **Module frequency:** per always **Supported distros:** all **Config keys**:: chef: directories: (defaulting to /etc/chef, /var/log/chef, /var/lib/chef, /var/cache/chef, /var/backups/chef, /run/chef) validation_cert: (optional string to be written to file validation_key) special value 'system' means set use existing file validation_key: (optional the path for validation_cert. default /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: encrypted_data_bag_secret: environment: file_backup_path: file_cache_path: json_attribs: log_level: log_location: node_name: omnibus_url: omnibus_url_retries: omnibus_version: pid_file: server_url: show_time: ssl_verify_mode: validation_cert: validation_key: validation_name: � N)�dedent)�subp� temp_utils� templater� url_helper�util)� MetaSchema�get_meta_doc)� PER_ALWAYSz1.8z /etc/chefz /var/log/chefz /var/lib/chefz/var/cache/chefz/var/backups/chefz /var/run/chefz#https://www.chef.io/chef/install.sh� z/etc/chef/validation.pemz#/etc/chef/encrypted_data_bag_secret�_defaultz/etc/chef/firstboot.jsonz:verify_nonez:infoz/var/log/chef/client.logz/etc/chef/client.pemz/var/run/chef/client.pidT)Zssl_verify_modeZ log_level�log_location�validation_key�validation_cert� client_key�json_attribs�file_cache_pathZfile_backup_path�pid_file� show_time�encrypted_data_bag_secretr r r r r r r r � server_url� node_name�environment�validation_nameZchef_licensez/etc/chef/client.rbz/usr/bin/chef-clientz-dz-iZ1800z-sZ20�allZcc_chefZChefz0module that configures, starts and installs chefa This module enables chef to be installed (from packages, gems, or from omnibus). Before this occurs, chef configuration is written to disk (validation.pem, client.pem, firstboot.json, client.rb), and required directories are created (/etc/chef and /var/log/chef and so-on). If configured, chef will be installed and started in either daemon or non-daemon mode. If run in non-daemon mode, post run actions are executed to do finishing activities such as removing validation.pem.a� chef: directories: - /etc/chef - /var/log/chef validation_cert: system install_type: omnibus initial_attributes: apache: prefork: maxclients: 100 keepalive: off run_list: - recipe[apache2] - role[db] encrypted_data_bag_secret: /etc/chef/encrypted_data_bag_secret environment: _default log_level: :auto omnibus_url_retries: 2 server_url: https://chef.yourorg.com:4000 ssl_verify_mode: :verify_peer validation_name: yourorg-validator)�id�name�title�description�distrosZexamples� frequencyc C s. t j| ddd�}|r*tjjt�r*tjt� d S )NZdelete_validation_post_execF)�default)r �get_cfg_option_bool�os�path�isfile�CHEF_VALIDATION_PEM_PATH�unlink)�chef_cfg�logZ delete_pem� r* �/usr/lib/python3.6/cc_chef.py� post_run_chef� s r, c C s� t j� }xf|j� D ]Z\}}|tkr0|jd|� q|d krBd ||<