# Invoking packet.net from Ansible

**URL:** <https://forum.ansible.com/t/invoking-packet-net-from-ansible/24247>\
**Category:** Ansible Project\
**Created:** [April 19, 2017, 12:13pm UTC](https://forum.ansible.com/t/invoking-packet-net-from-ansible/24247 "2017-04-19T12:13:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anand\_kolli](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@anand\_kolli](https://forum.ansible.com/u/anand_kolli)\
**Post date:** [April 19, 2017, 12:13pm UTC](https://forum.ansible.com/t/invoking-packet-net-from-ansible/24247/1 "2017-04-19T12:13:57Z")

</div>

Hello,

I am facing an issue while invoking [packet.net](http://packet.net) from Ansible.

[https://docs.ansible.com/ansible/packet\_device\_module.html](https://docs.ansible.com/ansible/packet_device_module.html)

[https://github.com/ngrewe/packet-python/tree/ansible](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.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [April 19, 2017, 8:01pm UTC](https://forum.ansible.com/t/invoking-packet-net-from-ansible/24247/2 "2017-04-19T20:01:15Z")

</div>

> I am facing an issue while invoking packet.net from Ansible.
> 
> [https://docs.ansible.com/Onansible/packet\_device\_module.html](https://docs.ansible.com/Onansible/packet_device_module.html)  
> [https://github.com/ngrewe/packet-python/tree/ansible](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:
> 
> &nbsp;&nbsp;tasks:  
> &nbsp;&nbsp;- packet\_device:  
> &nbsp;&nbsp;&nbsp;&nbsp;^ here
> 
> I have installed python packet and my python version is greater than 2.6

What Ansible version are you using?
