Skip to content

Where is the ansible-inventory.yaml ? #3605

Answered by afbjorklund
squeeb asked this question in Q&A
Discussion options

You must be logged in to vote

We deprecated the ansible provisioning and the ansible-inventory.yaml, but haven't yet fully removed it from the code...

The file was only generated during the playbook execution, so it is not created upon instance creation (as you noticed).

Now that the ssh.config is generated, it is easy to generate an inventory consisting of only the "lima-default" (etc) aliases:

lima:
  hosts:
    lima-default:
$ ansible -i hosts.yaml -m ping all
lima-default | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}

It is similar to the deprecation of the lima show-ssh default command, that is replaced w…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@squeeb
Comment options

@afbjorklund
Comment options

Answer selected by AkihiroSuda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants