Invoking packet.net from Ansible

Hello,

I am facing an issue while invoking packet.net from Ansible.

https://docs.ansible.com/ansible/packet_device_module.html

https://github.com/ngrewe/packet-python/tree/ansible

below is my playbook file

  • name: create 1 device
    hosts: localhost
    tasks:
  • packet_device:
    project_id: <my_project_id>
    auth_token: <my_auth_token>
    hostnames: myserver
    operating_system: ubuntu_16_04
    plan: baremetal_0
    facility: sjc1

And when try to run I see below error:

root@virtual-machine:~# ansible-playbook play.yml --check
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in ‘/home/test/play.yml’: line 4, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

tasks:

  • packet_device:
    ^ here

I have installed python packet and my python version is greater than 2.6

Any help would appreciated.

I am facing an issue while invoking packet.net from Ansible.

https://docs.ansible.com/Onansible/packet_device_module.html
https://github.com/ngrewe/packet-python/tree/ansible

The error appears to have been in '/home/test/play.yml': line 4, column 5,
but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
  - packet_device:
    ^ here

I have installed python packet and my python version is greater than 2.6

What Ansible version are you using?