Skip to content

Ansible failed because of undefined ansible_port #714

@ravbaba

Description

@ravbaba

On Vagrant I get the error:

fatal: [master1]: FAILED! => {"failed": true, "msg": "'ansible_port' is undefined"}

it looks like vagrant ansible provisioner doesn't apply changes which has been added to ansible 2.0

Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host, and ansible_port.

so inventory file crated by vagrant

.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory

uses old variables:

master1 ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='core' ansible_ssh_private_key_file='/Users/apollo/.vagrant.d/insecure_private_key'

It looks like they are trying to fix it in Vagrant repository, more info here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions