Building Module - Unable to set correct type for DEFAULT_LOCAL_TMP

137 views
Skip to first unread message

Luvpreet Singh

unread,
Jul 26, 2017, 8:28:38 AM7/26/17
to Ansible Project
I have just started to learn on how to build modules in Ansible.

I have followed this page,  http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html

I created the python file, cloned the ansible repo told there, and ran the command,

ansible/hacking/test-module -m ./timetest.py

But I am getting something like this,

Unable to set correct type for DEFAULT_LOCAL_TMP, skipping* including generated source, if any, saving to: /home/luvpreet/.ansible_module_generated
***********************************
RAW OUTPUT
{"time": "2017-07-26 17:55:17.854018"}


***********************************
PARSED OUTPUT
{
"time": "2017-07-26 17:55:17.854018"
}
Traceback (most recent call last):
File "ansible/hacking/test-module", line 271, in <module>
shutil.rmtree(C.DEFAULT_LOCAL_TMP, True)
AttributeError: 'module' object has no attribute 'DEFAULT_LOCAL_TMP'


What is the issue here ?

Kai Stian Olstad

unread,
Jul 26, 2017, 10:20:03 AM7/26/17
to ansible...@googlegroups.com
On 26. juli 2017 14:28, Luvpreet Singh wrote:
> I have just started to learn on how to build modules in Ansible.

I can't help with you problem, but wanted mention that Ansible has a
list for development, you might have better luck there.

https://docs.ansible.com/ansible/latest/community.html#mailing-list-information



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