Kitchen converge failing on chefDK license acceptance

Versions i am Using:

ChefDK version: 4.3.13
Chef Infra Client version: 15.2.20
Chef InSpec version: 4.10.4
Test Kitchen version: 2.2.5
Foodcritic version: 16.1.1
Cookstyle version: 0.72.0

Description:

I am trying to perform kitchen converge on of the cookbooks i am working with for every run its showing me issue with license acceptance i even included the "cheflicense: accept" in the yml file does not works at all.

Any help on this would be highly appreciated, kind of stuck now :confused:

.kitchen.yml


driver:
name: vagrant
synced_folders:
- ["../sis/tools", "/tmp/cool-tools", "create: true"]

driver_config:
customize:
memory: 2024
cpus: 1

provisioner:
name: chef_zero
chef_license: accept

platforms:

  • name: ubuntu-19.04

suites:

  • name: server1
    driver_config:
    network:
    - [ "private_network", {ip: "192.168.56.40" }]
    vm_hostname: server-01.local
    provisioner:
    policyfile: test/server.rb
    name: chef_zero
    chef_license: accept
    always_update_cookbooks: true
    max_retries: 1
    attributes:
    hubot:
    bind_address: 192.168.56.40
    config:
    HUBOT_URL: http://192.168.56.40:8088
    JENKINS_PASSWORD: <%= ENV['JENKINS_PASSWORD'] %>
    JENKINS_JOB_TOKEN: <%= ENV['JENKINS_JOB_TOKEN'] %>
    SAT_CLIENT_SECRET: <%= ENV['SAT_CLIENT_SECRET'] %>
    HUBOT_SLACK_TOKEN: <%= ENV['HUBOT_SLACK_TOKEN'] %>
    GITHUB_TOKEN: <%= ENV['GITHUB_TOKEN'] %>
    ZABBIX_PASSWORD: <%= ENV['ZABBIX_PASSWORD'] %>
    HUBOT_SPLUNK_PASS: <%= ENV['HUBOT_SPLUNK_PASS'] %>
    GUMBY_PASSWORD: <%= ENV['GUMBY_PASSWORD'] %>
    AWS_ACCESS_KEY_ID: <%= ENV['AWS_ACCESS_KEY_ID'] %>
    AWS_SECRET_ACCESS_KEY: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
    S3_ACCESS_KEY_ID: <%= ENV['S3_ACCESS_KEY_ID'] %>
    S3_SECRET_ACCESS_KEY: <%= ENV['S3_SECRET_ACCESS_KEY'] %>
    HUBOT_VAULT_TOKEN: <%= ENV['HUBOT_VAULT_TOKEN'] %>
    HUBOT_CONSUL_TOKEN: <%= ENV['HUBOT_CONSUL_TOKEN'] %>
    CONFLUENCE_PASSWORD: <%= ENV['CONFLUENCE_PASSWORD'] %>
    consul:
    servers_addrs:
    - 192.168.56.10

- 192.168.56.11

- 192.168.56.12

    config:
      bind_addr: 192.168.56.40
      client_addr: 192.168.56.40
      encrypt: <%= ENV['CONSUL_ENCRYPT_KEY'] %>
      acl_agent_token: <%= ENV['CONSUL_ACL_AGENT_TOKEN'] %>
      acl_token: <%= ENV['CONSUL_ACL_TOKEN'] %>

==============================================================================
LOGS:

$sudo kitchen converge
-----> Starting Kitchen (v2.3.3)
-----> Converging ...
Preparing files for transfer
Policy lock file doesn't exist, running chef install for Policyfile /Users/amoham583/Documents/newhubot/zis-hubot-cookbook/test/zis-hubot-server.rb...
Chef Development Kit cannot execute without accepting the license

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #converge action: [Expected process to exit with [0], but received '172'
---- Begin output of chef install /Users/amoham583/Documents/newhubot/zis-hubot-cookbook/test/zis-hubot-server.rb ----
STDOUT: Chef Development Kit cannot execute without accepting the license
STDERR:
---- End output of chef install /Users/amoham583/Documents/newhubot/zis-hubot-cookbook/test/zis-hubot-server.rb ----
Ran chef install /Users/amoham583/Documents/newhubot/zis-hubot-cookbook/test/zis-hubot-server.rb returned 172] on hubot-server1-ubuntu-1904


Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

$:sudo kitchen list
Instance Driver Provisioner Verifier Transport Last Action Last Error
hubot-server1-ubuntu-1904 Vagrant ChefZero Busser Ssh Created Kitchen::ShellOut::ShellCommandFailed

Any update on this ?? just want to make sure this post is still active. its appearing blurred on the main page ?

Is your YAML indentation off? It's hard to tell on the formatting of this post, it should look something like this:

provisioner:
  name: chef_zero
  chef_license: accept
  product_name: chef
  product_version: 15

@MattRay thanks for the reply..

i checked the yml file for indentation its looks good for the indentation part.

provisioner:
  name: chef_zero
  chef_license: accept
  product_name: chef
  product_version: 15

platforms:
  - name: centos-7.4