Skip to content

Intro to Ansible Lab inventory file not found #100

@GShuttleworth

Description

@GShuttleworth

When trying to run the lab I get errors around the inventory file/host file not being found:

ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: iosxe

I believe the ansible.cfg file is incorrect.

When changed from:

[defaults]
hostfile = hosts
host_key_checking = False
deprecation_warnings=False
stdout_callback = skippy


[persistent_connection]
connect_timeout = 100
command_timeout = 80

to (changing line 2)

[defaults]
inventory = hosts
host_key_checking = False
deprecation_warnings=False
stdout_callback = skippy


[persistent_connection]
connect_timeout = 100
command_timeout = 80

all errors are solved and the playbooks run as intended.

I would create a pull request for this change but want someone to sanity check this first for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions