drone-plugins / drone-ansible

Drone plugin to provision via Ansible
http://plugins.drone.io/drone-plugins/drone-ansible
Apache License 2.0
30 stars 41 forks source link

py3-netaddr missing in plugin? #58

Open fanuelsen opened 4 months ago

fanuelsen commented 4 months ago

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?