Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3-netaddr missing in plugin? #58

Open
fanuelsen opened this issue Feb 29, 2024 · 0 comments
Open

py3-netaddr missing in plugin? #58

fanuelsen opened this issue Feb 29, 2024 · 0 comments

Comments

@fanuelsen
Copy link

py3-netaddr missing in plugin? i'm having trouble to use a dynamic inventory. The community.general.proxmox inventory would not parse the ip addresses from my proxmox host when i'm trying to use the compose function in the inventory script.

example:

url: ""
user: ""
password: ""
want_facts: true
keyed_groups:
    # proxmox_tags_parsed is an example of a fact only returned when 'want_facts=true'
  - key: proxmox_tags_parsed
    separator: ";"
    prefix: group
groups:
  alpine: "'alpine' in (proxmox_tags_parsed|list)"
compose:
  ansible_host: "proxmox_agent_interfaces | selectattr('name', 'equalto', 'eth0') | map(attribute='ip-addresses') | flatten | first | ansible.utils.ipaddr('address')"
want_proxmox_nodes_ansible_host: true

the result without netaddr installed when running ansible-inventory -i inventory.proxmox.yml --list

            "servername": {
                "proxmox_agent": "1",
                "proxmox_agent_interfaces": [

after i installed the py3-netaddr with apk add py3-netaddr

            "servername": {
                "ansible_host": "192.168.1.30",
                "proxmox_agent": "1",
                "proxmox_agent_interfaces": [

Is there a way to add this with out running the commands: function in drone.yml or should this be added to the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant