neillturner / kitchen-ansible

Ansible Provisioner for Test Kitchen
Other
350 stars 134 forks source link

kitchen converge failing #282

Closed RickS-C137 closed 6 years ago

RickS-C137 commented 6 years ago

Hello, I'm having problems with the kitchen converge step. Sadly the error message is pretty unusable for me. So it would be very kind, if someone could help me, please. Additionally I'm not quite familiar with kitchen and librarian. So please be not to hard :) I installed kitchen, ansible-kitchen, ansible-librarian and the dependencies last week, so everything should still be the newest version available. So here are the details. Kitchen create is running fine. Installing the dependencies with librarian-ansible install also works without any issues, but kitchen converge runs into an error:

$ kitchen test
...
-----> Starting Kitchen (v1.23.2)
-----> Converging <default-amazon-linux-2>...
       Preparing files for transfer
       Preparing playbook
       Preparing inventory
       Preparing modules
       nothing to do for modules
       Preparing roles
       Resolving role dependencies with Librarian-Ansible 3.0.2...
 ------Exception-------
 Class: Kitchen::ActionFailed
 Message: 1 actions failed.
     Failed to complete #converge action: [Is a directory - read] on default-amazon-linux-2
 ----------------------
 Please see .kitchen/logs/kitchen.log for more details
 Also try running kitchen diagnose --all for configuration
$ gem list

*** LOCAL GEMS ***

addressable (2.5.2)
aws-sdk (2.11.102)
aws-sdk-core (2.11.102)
aws-sdk-resources (2.11.102)
aws-sigv4 (1.0.3)
azure_mgmt_resources (0.17.0)
bigdecimal (1.2.8)
builder (3.2.3)
CFPropertyList (2.2.8)
coderay (1.1.2)
concurrent-ruby (1.0.5)
declarative (0.0.10)
declarative-option (0.1.0)
did_you_mean (1.0.0)
diff-lcs (1.3)
docker-api (1.34.2)
domain_name (0.5.20180417)
erubis (2.7.0)
excon (0.62.0)
faraday (0.15.2)
faraday-cookie_jar (0.0.6)
faraday_middleware (0.12.2)
ffi (1.9.25)
google-api-client (0.19.8)
googleauth (0.6.4)
gssapi (1.2.0)
gyoku (1.3.1)
hashie (3.5.7)
highline (2.0.0)
htmlentities (4.3.4)
http-cookie (1.0.3)
httpclient (2.8.3)
inifile (3.0.0)
inspec (2.2.55)
io-console (0.4.5)
jmespath (1.4.0)
json (1.8.3.1)
jwt (2.1.0)
kitchen-ansible (0.48.6)
kitchen-docker (2.7.0)
kitchen-inspec (0.23.1)
kitchen-vagrant (1.3.2)
kitchen-verifier-serverspec (0.6.11)
librarian (0.1.2)
librarian-ansible (3.0.2)
libxml-ruby (2.9.0)
little-plugger (1.1.4)
logging (2.2.2)
memoist (0.16.0)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (3.2016.0521)
minitest (5.8.5)
mixlib-install (3.11.2)
mixlib-log (2.0.4)
mixlib-shellout (2.4.0)
mixlib-versioning (1.2.2)
ms_rest (0.7.2)
ms_rest_azure (0.11.0)
multi_json (1.13.1)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (4.2.0)
net-ssh-gateway (1.3.0)
net-telnet (0.1.1)
nokogiri (1.5.6)
nori (2.6.0)
os (1.0.0)
parallel (1.12.1)
parslet (1.8.2)
power_assert (0.2.6)
pry (0.11.3)
psych (2.1.0.1)
public_suffix (3.0.2)
rake (10.4.2)
rdoc (4.2.1)
representable (3.0.4)
retriable (3.1.2)
rspec (3.8.0)
rspec-core (3.8.0)
rspec-expectations (3.8.1)
rspec-its (1.2.0)
rspec-mocks (3.8.0)
rspec-support (3.8.0)
rubyntlm (0.6.2)
rubyzip (1.2.1)
semverse (2.0.0)
serverspec (2.41.3)
sfl (2.3)
signet (0.8.1)
specinfra (2.75.1)
sqlite3 (1.3.11)
sslshake (1.2.0)
test-kitchen (1.23.2)
test-unit (3.1.5)
thor (0.20.0)
timeliness (0.3.8)
tomlrb (1.2.7)
train (1.4.25)
uber (0.1.0)
unf (0.1.4)
unf_ext (0.0.7.5)
winrm (2.2.3)
winrm-elevated (1.1.0)
winrm-fs (1.2.1)
$ kitchen diagnose --all
---
timestamp: 2018-08-14 12:55:32 UTC
kitchen_version: 1.23.2
plugins:
  driver:
    Vagrant:
      class: Kitchen::Driver::Vagrant
      version: 1.3.2
      api_version: 2
  provisioner:
    AnsiblePlaybook:
      class: Kitchen::Provisioner::AnsiblePlaybook
      version:
      api_version:
  transport:
    Ssh:
      class: Kitchen::Transport::Ssh
      version: 1.23.2
      api_version: 1
  verifier:
    Serverspec:
      class: Kitchen::Verifier::Serverspec
      version: 1.23.2
      api_version: 1
loader:
  process_erb: true
  process_local: true
  process_global: true
  global_config:
  project_config:
    filename: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/.kitchen.yml"
    raw_data:
      driver:
        name: vagrant
      platforms:
      - name: amazon-linux-2
        driver_config:
          remove_images: true
          box: sageofdata/amazon-linux-2
          provision: true
          vagrantfiles:
          - amazon-linux-2.rb
      provisioner:
        name: ansible_playbook
        hosts: test-kitchen
        transport:
          max_ssh_sessions: 6
        requirements_path: roles
        roles_path: roles
        ansible_verbose: true
        ansible_verbosity: 1
        require_ansible_repo: false
        require_runner: true
        require_ansible_omnibus: false
        require_chef_for_busser: false
        ansible_connection: ssh
        ansible_vault_password_file: "~/.ansible-vault-password"
        ansible_diff: false
        idempotency_test: true
        extra_vars:
          integration_test: true
          tomcat_version: 9.0.10
          ec2_tag_role: fs5
      verifier:
        name: serverspec
        use_sudo: true
        sudo_path: true
      suites:
      - name: default
        verifier:
          default_pattern: true
  local_config:
  combined_config:
    filename:
    raw_data:
      driver:
        name: vagrant
      platforms:
      - name: amazon-linux-2
        driver_config:
          remove_images: true
          box: sageofdata/amazon-linux-2
          provision: true
          vagrantfiles:
          - amazon-linux-2.rb
      provisioner:
        name: ansible_playbook
        hosts: test-kitchen
        transport:
          max_ssh_sessions: 6
        requirements_path: roles
        roles_path: roles
        ansible_verbose: true
        ansible_verbosity: 1
        require_ansible_repo: false
        require_runner: true
        require_ansible_omnibus: false
        require_chef_for_busser: false
        ansible_connection: ssh
        ansible_vault_password_file: "~/.ansible-vault-password"
        ansible_diff: false
        idempotency_test: true
        extra_vars:
          integration_test: true
          tomcat_version: 9.0.10
          ec2_tag_role: fs5
      verifier:
        name: serverspec
        use_sudo: true
        sudo_path: true
      suites:
      - name: default
        verifier:
          default_pattern: true
instances:
  default-amazon-linux-2:
    platform:
      os_type: unix
      shell_type: bourne
    state_file:
      hostname: 127.0.0.1
      last_action: create
      last_error: Errno::EISDIR
      port: '2222'
      ssh_key: "/Users/user/.vagrant.d/insecure_private_key"
      username: vagrant
    driver:
      boot_timeout:
      box: sageofdata/amazon-linux-2
      box_check_update:
      box_download_ca_cert:
      box_download_insecure:
      box_url:
      box_version:
      cache_directory: "/tmp/omnibus/cache"
      cachier:
      customize: {}
      gui:
      kitchen_cache_directory: "/Users/user/.kitchen/cache"
      kitchen_root: "/Users/user/IdeaProjects/ansible-roles/tomcat-install"
      linked_clone:
      log_level: :info
      name: vagrant
      network: []
      pre_create_command:
      provider: virtualbox
      provision: true
      remove_images: true
      ssh: {}
      synced_folders: []
      test_base_path: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/test/integration"
      vagrant_binary: vagrant
      vagrantfile_erb: "/Library/Ruby/Gems/2.3.0/gems/kitchen-vagrant-1.3.2/templates/Vagrantfile.erb"
      vagrantfiles:
      - "/Users/user/IdeaProjects/ansible-roles/tomcat-install/amazon-linux-2.rb"
      vm_hostname: default-amazon-linux-2.vagrantup.com
    provisioner:
      additional_copy_path:
      additional_copy_role_path: false
      additional_ssh_private_keys:
      ansible_apt_repo: ppa:ansible/ansible
      ansible_cfg_path:
      ansible_check: false
      ansible_connection: ssh
      ansible_diff: false
      ansible_host_key_checking: true
      ansible_inventory:
      ansible_inventory_file:
      ansible_limit:
      ansible_omnibus_remote_path: "/opt/ansible"
      ansible_omnibus_url: https://raw.githubusercontent.com/neillturner/omnibus-ansible/master/ansible_install.sh
      ansible_platform: ''
      ansible_playbook_command:
      ansible_sles_repo: http://download.opensuse.org/repositories/systemsmanagement/SLE_12/systemsmanagement.repo
      ansible_source_rev:
      ansible_source_url: git://github.com/ansible/ansible.git
      ansible_sudo: true
      ansible_vault_password_file: "~/.ansible-vault-password"
      ansible_verbose: true
      ansible_verbosity: 1
      ansible_version:
      ansible_yum_repo:
      ansiblefile_path: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/Ansiblefile"
      callback_plugins_path:
      chef_bootstrap_url: https://www.chef.io/chef/install.sh
      command_prefix:
      custom_post_install_command:
      custom_post_play_command:
      custom_pre_install_command:
      custom_pre_play_command:
      debug:
      downloads: {}
      enable_yum_epel: false
      env_vars: {}
      extra_vars:
        integration_test: true
        tomcat_version: 9.0.10
        ec2_tag_role: fs5
      extra_vars_file:
      filter_plugins_path:
      ftp_proxy:
      group_vars_path:
      host_vars_path:
      hosts: test-kitchen
      http_proxy:
      https_proxy:
      idempotency_skip_tags: []
      idempotency_tags: []
      idempotency_test: true
      ignore_ansible_cfg: false
      ignore_extensions_from_root:
      - ".pyc"
      ignore_paths_from_root: []
      kerberos_conf_file:
      kitchen_root: "/Users/user/IdeaProjects/ansible-roles/tomcat-install"
      library_plugins_path:
      lookup_plugins_path:
      max_retries: 1
      modules_path:
      name: ansible_playbook
      no_proxy:
      playbook: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/test/integration/default/default.yml"
      python_sles_repo: http://download.opensuse.org/repositories/devel:/languages:/python/SLE_12/devel:languages:python.repo
      recursive_additional_copy_path:
      require_ansible_omnibus: false
      require_ansible_repo: false
      require_ansible_source: false
      require_chef_for_busser: false
      require_pip: false
      require_ruby_for_busser: false
      require_runner: true
      require_windows_support: false
      requirements_path: roles
      retry_on_exit_code: []
      role_name:
      roles_path: roles
      root_path: "/tmp/kitchen"
      shell_command: sh
      show_command_output: false
      ssh_known_hosts:
      sudo: true
      sudo_command: sudo -E
      tags: []
      test_base_path: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/test/integration"
      transport:
        max_ssh_sessions: 6
      update_package_repos: true
      wait_for_retry: 30
    transport:
      compression: false
      compression_level: 0
      connection_retries: 5
      connection_retry_sleep: 1
      connection_timeout: 15
      keepalive: true
      keepalive_interval: 60
      kitchen_root: "/Users/user/IdeaProjects/ansible-roles/tomcat-install"
      log_level: :info
      max_ssh_sessions: 9
      max_wait_until_ready: 600
      name: ssh
      port: 22
      ssh_gateway:
      ssh_gateway_port: 22
      ssh_gateway_username:
      ssh_http_proxy:
      ssh_http_proxy_password:
      ssh_http_proxy_port:
      ssh_http_proxy_user:
      ssh_key:
      test_base_path: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/test/integration"
      username: root
    verifier:
      additional_install_command:
      additional_serverspec_command:
      bundler_path:
      chef_omnibus_root: "/opt/chef"
      color: true
      command_prefix:
      custom_install_command:
      custom_serverspec_command:
      debug:
      default_path: "/tmp/kitchen"
      default_pattern: true
      env_vars: {}
      extra_flags:
      format: documentation
      ftp_proxy:
      gemfile:
      http_proxy:
      https_proxy:
      kitchen_root: "/Users/user/IdeaProjects/ansible-roles/tomcat-install"
      live_stream: !ruby/object:IO {}
      log_level: :info
      name: serverspec
      patterns: []
      remote_exec: true
      remove_default_path: false
      require_runner: false
      root_path: "/tmp/verifier"
      rspec_path:
      runner_url: https://raw.githubusercontent.com/neillturner/serverspec-runners/master/ansiblespec_runner.rb
      serverspec_command:
      shellout_opts: {}
      sleep: 0
      sudo: true
      sudo_command: sudo -E -H
      sudo_path: true
      suite_name: default
      test_base_path: "/Users/user/IdeaProjects/ansible-roles/tomcat-install/test/integration"
      test_serverspec_installed: true
      use_sudo: true

If you need any more information, please let me know.

neillturner commented 6 years ago

Folks tend to use ansible galaxy and a requirements file rather than ansible librarian these days. I suspct this is some issue to do with amazon linux 2 and readonly ssh file so closing.