def __init__(self, **kwds): self.name = kwds.get("name") or "chef-client-script.%s.%s" % (kwds.get( 'event_name', ''), time.time()) chef_params = self.chef_params = kwds.pop('chef') self.with_json_attributes = extract_json_attributes(self.chef_params) first_bootstrap = chef_params.get('first_bootstrap') self.chef = ChefClient( self.chef_params.get('server_url'), self.with_json_attributes, chef_params.get('node_name'), chef_params.get('validator_name'), chef_params.get('validator_key'), chef_params.get('environment'), kwds.get("environ"), chef_params.get('log_level', 'auto'), override_runlist=bool(self.with_json_attributes) and not first_bootstrap, ssl_verify_mode=self.chef_params.get("ssl_verify_mode", "verify_none"), client_rb_template=self.chef_params.get('client_rb_template')) self.body = self._get_body() super(ChefClientScript, self).__init__(**kwds)
def __init__(self, **kwds): self.name = kwds.get("name") or "chef-client-script.%s.%s" % (kwds.get('event_name', ''), time.time()) self.chef_params = kwds.pop('chef') self.with_json_attributes = extract_json_attributes(self.chef_params) self.chef = ChefClient(self.chef_params.get('server_url'), self.with_json_attributes, self.chef_params.get('node_name'), self.chef_params.get('validator_name'), self.chef_params.get('validator_key'), self.chef_params.get('environment'), kwds.get("environ"), override_runlist=bool(self.with_json_attributes)) self.body = self._get_body() super(ChefClientScript, self).__init__(**kwds)
def __init__(self, **kwds): self.name = kwds.get("name") or "chef-solo-script.%s.%s" % (kwds.get('event_name', ''), time.time()) self.chef_params = kwds.pop("chef") self.with_json_attributes = extract_json_attributes(self.chef_params) self.chef = ChefSolo(self.chef_params.get("cookbook_url"), self.chef_params.get("cookbook_url_type"), self.with_json_attributes, self.chef_params.get("relative_path"), kwds.get("environ"), self.chef_params.get("ssh_private_key"), run_as=kwds.get("run_as"), temp_dir=kwds.get("temp_dir")) self.chef_temp_dir = self.chef.temp_dir self.body = self._get_body() super(ChefSoloScript, self).__init__(**kwds)
def __init__(self, **kwds): self.name = kwds.get("name") or "chef-solo-script.%s.%s" % (kwds.get('event_name', ''), time.time()) self.chef_params = kwds.pop("chef") self.with_json_attributes = extract_json_attributes(self.chef_params) self.chef = ChefSolo(self.chef_params.get("cookbook_url"), self.chef_params.get("cookbook_url_type"), self.with_json_attributes, self.chef_params.get("relative_path"), kwds.get("environ"), self.chef_params.get("ssh_private_key"), run_as=kwds.get("run_as"), log_level=self.chef_params.get('log_level', 'auto'), temp_dir=kwds.get("temp_dir")) self.chef_temp_dir = self.chef.temp_dir self.body = self._get_body() super(ChefSoloScript, self).__init__(**kwds)
def __init__(self, **kwds): self.name = kwds.get("name") or "chef-client-script.%s.%s" % (kwds.get( 'event_name', ''), time.time()) self.chef_params = kwds.pop('chef') self.with_json_attributes = extract_json_attributes(self.chef_params) self.chef = ChefClient(self.chef_params.get('server_url'), self.with_json_attributes, self.chef_params.get('node_name'), self.chef_params.get('validator_name'), self.chef_params.get('validator_key'), self.chef_params.get('environment'), kwds.get("environ"), override_runlist=bool( self.with_json_attributes)) self.body = self._get_body() super(ChefClientScript, self).__init__(**kwds)