lib/kitchen/provisioner/chef_zero.rb
def add_optional_chef_client_args!(args)
        if config[:json_attributes]
          json = remote_path_join(config[:root_path], "dna.json")
          args << "--json-attributes #{json}"
        end
        args << "--logfile #{config[:log_file]}" if config[:log_file]
        return unless modern?

        # these flags are modern/chef-client local most only and will not work
        # on older versions of chef-client
        if config[:chef_zero_host]
          args << "--chef-zero-host #{config[:chef_zero_host]}"
        end
        if config[:chef_zero_port]
          args << "--chef-zero-port #{config[:chef_zero_port]}"
        end
        args << "--profile-ruby" if config[:profile_ruby]
      end
# Adds optional flags to a chef-client command, depending on
# configuration data. Note that this method mutates the incoming Array.
#
# @param args [Array<String>] array of flags
# @api private
# rubocop:disable Metrics/CyclomaticComplexity
Adds optional flags to a chef-client command, depending on
configuration data. Note that this method mutates the incoming Array.
Adds optional flags to a chef - client command depending on configuration data . Note that this method mutates the incoming Array .
def add_optional_chef_client_args!(args)
        if config[:json_attributes]
          json = remote_path_join(config[:root_path], "dna.json")
          args << "--json-attributes #{json}"
        end
        args << "--logfile #{config[:log_file]}" if config[:log_file]
        return unless modern?
        if config[:chef_zero_host]
          args << "--chef-zero-host #{config[:chef_zero_host]}"
        end
        if config[:chef_zero_port]
          args << "--chef-zero-port #{config[:chef_zero_port]}"
        end
        args << "--profile-ruby" if config[:profile_ruby]
      end
def add_optional_chef_client_args! ( args ) if config [ :json_attributes ] json = remote_path_join ( config [ :root_path ] , "dna.json" ) args << "--json-attributes #{json}" end args << "--logfile #{config[:log_file]}" if config [ :log_file ] return unless modern? if config [ :chef_zero_host ] args << "--chef-zero-host #{config[:chef_zero_host]}" end if config [ :chef_zero_port ] args << "--chef-zero-port #{config[:chef_zero_port]}" end args << "--profile-ruby" if config [ :profile_ruby ] end
Adds optional flags to a chef-client command, depending on
configuration data.
Adds optional flags to a chef - client command depending on configuration data .
# these flags are modern/chef-client local most only and will not work # on older versions of chef-client
args
array of flags
array of flags
api
private rubocop:disable Metrics/CyclomaticComplexity
private rubocop : disable Metrics / CyclomaticComplexity