Where is the ansible-inventory.yaml ? #3605
-
Based on https://lima-vm.io/docs/dev/internals/#instance-directory-lima_homeinstance , an This is not the case:
I want to be able to dynamically include this file during ansible playbook development for local development. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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 We should make a better job of documenting how to use the lima instances, with ansible playbooks (or with ssh). Note: The commands above assumes that the lima instances have been added to the ssh config file (~/.ssh/config):
|
Beta Was this translation helpful? Give feedback.
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:
It is similar to the deprecation of the
lima show-ssh default
command, that is replaced w…