# spacewalk.py issues and questions

**URL:** <https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678>\
**Category:** Ansible Project\
**Created:** [July 15, 2014, 2:37pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678 "2014-07-15T14:37:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Jacobs](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@David\_Jacobs](https://forum.ansible.com/u/David_Jacobs)\
**Post date:** [July 15, 2014, 2:37pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/1 "2014-07-15T14:37:54Z")

</div>

I am trying to get a good inventory from both a spacewalk and an older satellite server. I was able to share the spacewalk.py script with those server and produce an output, which is all one 1 line, and looks something like this: {“CentOS6\_Servers”: [“server1”, “server2”, “server3”, “server4”, “server5”, … etc for 600+ servers and many many groops. When I try this:

ansible CentOS6\_Servers -a “hostname” -i /etc/ansible/inventory/spacewalk\_list\_07-11-2014.txt

I get this → ERROR: Invalid ini entry: [[ncias-p584.nci.nih.gov](http://ncias-p584.nci.nih.gov), - need more than 1 value to unpack

Is this due to the file being all one line? Is this improper YAML syntax, maybe? Sorry, I am a new to YAML Syntax, and Ansible.

Am I using spacewalk.py incorrectly?

Thanks for assistance you can give me.

---

<div class="post-metadata">

**Author:** ![Tomasz\_Kontusz](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tomasz\_Kontusz](https://forum.ansible.com/u/Tomasz_Kontusz)\
**Post date:** [July 16, 2014, 7:50am UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/2 "2014-07-16T07:50:03Z")

</div>

David Jacobs \<psychodj@gmail.com\> napisał:

> I am trying to get a good inventory from both a spacewalk and an older  
> satellite server. I was able to share the spacewalk.py script with  
> those  
> server and produce an output, which is all one 1 line, and looks  
> something  
> like this: {"CentOS6\_Servers": ["server1", "server2", "server3",  
> "server4", "server5", ... etc for 600+ servers and many many groops.
> 
> When I try this:
> 
> ansible CentOS6\_Servers -a "hostname" -i  
> /etc/ansible/inventory/spacewalk\_list\_07-11-2014.txt
> 
> I get this -\> ERROR: Invalid ini entry: [ncias-p584.nci.nih.gov, -  
> need  
> more than 1 value to unpack
> 
> Is this due to the file being all one line? Is this improper YAML  
> syntax,  
> maybe? Sorry, I am a new to YAML Syntax, and Ansible.
> 
> Am I using spacewalk.py incorrectly?

Yes. You should point Ansible to the script, not saved output (if the file given to -i is executable, Ansible will use it as dynamic inventory).  
The error you are getting says that Ansible expects static inventories to be in an INI-like syntax.

---

<div class="post-metadata">

**Author:** ![David\_Jacobs](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@David\_Jacobs](https://forum.ansible.com/u/David_Jacobs)\
**Post date:** [July 16, 2014, 2:16pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/3 "2014-07-16T14:16:53Z")

</div>

so, like this?

ansible -i spacewalk.py textfile.txt?

---

<div class="post-metadata">

**Author:** ![Tomasz\_Kontusz](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tomasz\_Kontusz](https://forum.ansible.com/u/Tomasz_Kontusz)\
**Post date:** [July 16, 2014, 4:31pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/4 "2014-07-16T16:31:14Z")

</div>

David Jacobs \<psychodj@gmail.com\> napisał:

> so, like this?
> 
> ansible -i spacewalk.py textfile.txt?

More like:  
ansible CentOS6\_Servers -i spacewalk.py -m ping

What was textfile.txt meant to be?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 16, 2014, 7:37pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/5 "2014-07-16T19:37:54Z")

</div>

ansible -i spacewalk.py playbook.yml

and spacewalk.py should be marked executable (chmod +x)

---

<div class="post-metadata">

**Author:** ![Tomasz\_Kontusz](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tomasz\_Kontusz](https://forum.ansible.com/u/Tomasz_Kontusz)\
**Post date:** [July 16, 2014, 7:48pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/6 "2014-07-16T19:48:19Z")

</div>

Dnia śro, 16 lip 2014, 21:37:54 Michael DeHaan pisze:

> ansible -i spacewalk.py playbook.yml

You mean "ansible-playbook -i spacewalk.py playbook.yml"?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 16, 2014, 11:49pm UTC](https://forum.ansible.com/t/spacewalk-py-issues-and-questions/15678/7 "2014-07-16T23:49:49Z")

</div>

yes
