Invoking packet.net from Ansible

20 views
Skip to first unread message

anand kolli

unread,
Apr 19, 2017, 3:25:51 PM4/19/17
to Ansible Project
Hello,

I am facing an issue while invoking packet.net from 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.

Kai Stian Olstad

unread,
Apr 19, 2017, 4:01:40 PM4/19/17
to ansible...@googlegroups.com
On 19. april 2017 14:13, anand kolli wrote:
> 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?

On top of the documentation you link to is says
"New in version 2.3."

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages