Discussion:
[ansible-project] ERROR: Invalid ini entry
Юра Фролов
2015-07-17 05:44:02 UTC
Permalink
I first time configurating ansible. I use ansible-playbook 1.7.2, ubuntu
14.10 (last version in my ubuntu). I am configured playbook and task,
created inventory file.
I started ansible follow command
ansible-playbook -i /etc/ansible/inventory
/etc/ansible/roles/preconf/tasks/test_new.yml -v --list-hosts --list-tasks

my inventary file

[testserver]

10.95.46.117 ansible_ssh_port=5555 ansible_ssh_host=10.95.46.117
ansible_ssh_us

and receipt error:

ERROR: Invalid ini entry: This - need more than 1 value to unpack

In what my error? What i do wrong?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/613e99d8-f832-4baf-a6dd-fd6e638d7459%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-17 07:02:25 UTC
Permalink
I first time configurating ansible. I use ansible-playbook 1.7.2, ubuntu
14.10 (this last version ansible in my ububntu). I am configured playbook
and task, created inventory file.
I started ansible follow command
ansible-playbook -i /etc/ansible/inventory
/etc/ansible/roles/preconf/tasks/test_new.yml -v --list-hosts --list-tasks

contents my inventory file

[testserver]

10.95.46.117 ansible_ssh_port=5555 ansible_ssh_host=10.95.46.117
ansible_ssh_use

and receipt error:
ERROR: Invalid ini entry: This - need more than 1 value to unpack

In what my error? What i do wrong?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c7c6a47a-153e-4a17-aa35-0611f08fc043%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Querso
2015-07-17 12:58:04 UTC
Permalink
i can't see any value to ansible_ssh_user, if you haven't set one, you
should do it. i don't think ansible_ssh_host is needed because it is
already specified. then, you should set your password and the connection
type:

inventory file:

[testserver]

10.95.46.117

[testserver:vars]

ansible_ssh_port=5555

ansible_connection=YourConnectionType (can be ssh or winrm)

ansible_ssh_user=YourUserName

ansible_ssh_pass=SuperSecretPassword123

then try running: ansible-playbook -i /etc/ansible/inventory
/etc/ansible/roles/preconf/tasks/test_new.yml -vvvv

hope that helps
Post by Юра Фролов
I first time configurating ansible. I use ansible-playbook 1.7.2, ubuntu
14.10 (this last version ansible in my ububntu). I am configured playbook
and task, created inventory file.
I started ansible follow command
ansible-playbook -i /etc/ansible/inventory
/etc/ansible/roles/preconf/tasks/test_new.yml -v --list-hosts --list-tasks
contents my inventory file
[testserver]
10.95.46.117 ansible_ssh_port=5555 ansible_ssh_host=10.95.46.117
ansible_ssh_use
ERROR: Invalid ini entry: This - need more than 1 value to unpack
In what my error? What i do wrong?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/65483768-eaa9-41b0-9343-f38521a716d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-21 07:20:26 UTC
Permalink
I did the settings that you specify. My config file
[testserver]
10.95.46.117

[tesserver:vars]
ansible_ssh_port=5555
ansible_connection=ssh
ansible_ssh_user=user
ansible_ssh_pass=user

and I get the same error

~# ansible-playbook -i /etc/ansible/inventory
/etc/ansible/roles/preconf/tasks/test_new.yml -vvvv
ERROR: Invalid ini entry: This - need more than 1 value to unpack


In what may be another mistake?
Post by Юра Фролов
I first time configurating ansible. I use ansible-playbook 1.7.2, ubuntu
14.10 (this last version ansible in my ububntu). I am configured playbook
and task, created inventory file.
I started ansible follow command
ansible-playbook -i /etc/ansible/inventory
/etc/ansible/roles/preconf/tasks/test_new.yml -v --list-hosts --list-tasks
contents my inventory file
[testserver]
10.95.46.117 ansible_ssh_port=5555 ansible_ssh_host=10.95.46.117
ansible_ssh_use
ERROR: Invalid ini entry: This - need more than 1 value to unpack
In what my error? What i do wrong?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/12aea557-d594-4222-91f3-770126882f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-21 08:04:09 UTC
Permalink
And one more question. Of what value is said in the error message?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/83290941-3056-4a90-b907-695d011fde0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Querso
2015-07-21 09:12:28 UTC
Permalink
can you post a version of your playbook? can you ping the port you are
targeting?
Post by Юра Фролов
And one more question. Of what value is said in the error message?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/360b3c19-92dd-4f2b-a098-c76a4d425c2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Querso
2015-07-21 09:16:32 UTC
Permalink
by the way, you should have [testserver:vars] and not [tesserver:vars]
Post by Guillaume Querso
can you post a version of your playbook? can you ping the port you are
targeting?
Post by Юра Фролов
And one more question. Of what value is said in the error message?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fc86bb7d-2b87-4e27-baf4-0be61720340e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-21 10:16:38 UTC
Permalink
Post by Guillaume Querso
can you post a version of your playbook? can you ping the port you are
targeting?
~# ansible-playbook --version
ansible-playbook 1.7.2
# ping 10.95.46.117
PING 10.95.46.117 (10.95.46.117) 56(84) bytes of data.
64 bytes from 10.95.46.117: icmp_seq=1 ttl=64 time=0.949 ms
64 bytes from 10.95.46.117: icmp_seq=2 ttl=64 time=0.453 ms
^C

Or you're interested in the content test_new.yml?
Post by Guillaume Querso
by the way, you should have [testserver:vars] and not [tesserver:vars]
Oh, of course, I made a typo. I've corrected the typo. Still getting the
error message
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/92a166b5-7290-4c12-8c46-d03b0cadb9a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Querso
2015-07-21 12:35:51 UTC
Permalink
i would like to see the content of test_new.yml
Post by Guillaume Querso
Post by Guillaume Querso
can you post a version of your playbook? can you ping the port you are
targeting?
~# ansible-playbook --version
ansible-playbook 1.7.2
# ping 10.95.46.117
PING 10.95.46.117 (10.95.46.117) 56(84) bytes of data.
64 bytes from 10.95.46.117: icmp_seq=1 ttl=64 time=0.949 ms
64 bytes from 10.95.46.117: icmp_seq=2 ttl=64 time=0.453 ms
^C
Or you're interested in the content test_new.yml?
Post by Guillaume Querso
by the way, you should have [testserver:vars] and not [tesserver:vars]
Oh, of course, I made a typo. I've corrected the typo. Still getting the
error message
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1b33a854-3449-408a-9d89-794a3a2b9ee4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-21 12:48:07 UTC
Permalink
---
- host:10.95.46.117
sudo:True
sudo_user:user
task:
- name: install freeradius
apt:pkg=freeradius
- name: copy config
copy:src="/etc/ansible/roles/preconf/templates/freeradius"
dest="/etc/"
owner=root group=freeradius mode=0755
notify:
- restart freeradius


sudo_user:user it is user remote PC or user local PC?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/36dc39ef-e619-47ad-988e-db63a9a2abb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Querso
2015-07-21 13:12:48 UTC
Permalink
As suggested by the documentation (
http://docs.ansible.com/ansible/intro_configuration.html#sudo-user ), i
would say the remote. just to be clear, your remote is a Linux/Unix
machine? double check your indentation in your playbook to be sure nothing
is wrong here.
can you try: ansible 10.95.46.117 -m ping

Maybe consider to upgrade your ansible version (and your ubuntu)
What i don't understand is that you have an error related to syntax while i
can't find anything unusual..
Post by Юра Фролов
---
- host:10.95.46.117
sudo:True
sudo_user:user
- name: install freeradius
apt:pkg=freeradius
- name: copy config
copy:src="/etc/ansible/roles/preconf/templates/freeradius"
dest="/etc/"
owner=root group=freeradius mode=0755
- restart freeradius
sudo_user:user it is user remote PC or user local PC?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/15b23e14-41e1-41c6-a282-b4cabe1e173b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Toshio Kuratomi
2015-07-21 13:53:02 UTC
Permalink
Can you upload your actual inventory file somewhere for us to download and
take a look? I've just tested and one way that error can happen is if
there's trailing, non-ascii whitespace.

-Toshio
Post by Юра Фролов
---
- host:10.95.46.117
sudo:True
sudo_user:user
- name: install freeradius
apt:pkg=freeradius
- name: copy config
copy:src="/etc/ansible/roles/preconf/templates/freeradius"
dest="/etc/"
owner=root group=freeradius mode=0755
- restart freeradius
sudo_user:user it is user remote PC or user local PC?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/36dc39ef-e619-47ad-988e-db63a9a2abb0%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/36dc39ef-e619-47ad-988e-db63a9a2abb0%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAG9juEq9S7HKJxMTiCESRPFTqkY3UXyEu7dMrEJ4ynk2D%3D288A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-22 07:49:35 UTC
Permalink
втПрМОк, 21 Оюля 2015 г., 16:12:48 UTC+3 пПльзПватель Guillaume Querso
Post by Guillaume Querso
As suggested by the documentation (
http://docs.ansible.com/ansible/intro_configuration.html#sudo-user ), i
would say the remote. just to be clear, your remote is a Linux/Unix
machine? double check your indentation in your playbook to be sure nothing
is wrong here.
can you try: ansible 10.95.46.117 -m ping
Maybe consider to upgrade your ansible version (and your ubuntu)
What i don't understand is that you have an error related to syntax while
i can't find anything unusual..
My machine Linux on both side (Ubuntu 14.10).
c# ping 10.95.46.117
PING 10.95.46.117 (10.95.46.117) 56(84) bytes of data.
64 bytes from 10.95.46.117: icmp_seq=1 ttl=64 time=0.682 ms
64 bytes from 10.95.46.117: icmp_seq=2 ttl=64 time=0.404 ms
^C
--- 10.95.46.117 ping statistics ---
# ansible 10.95.46.117 -m ping
ERROR: Invalid ini entry: This - need more than 1 value to unpack



I have standard repository for Ubuntu. I have latest version ansible.
# ansible --version
ansible 1.7.2
# apt-cache showpkg ansible
Package: ansible
Versions:
1.7.2+dfsg-1



Can you upload your actual inventory file somewhere for us to download and
Post by Guillaume Querso
take a look? I've just tested and one way that error can happen is if
there's trailing, non-ascii whitespace
inventory file <https://sites.google.com/site/vrnunit/inventory>
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3d3d5dad-6cf8-488e-a3e1-1f7b4a8163aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Querso
2015-07-22 08:24:31 UTC
Permalink
your inventory seems ok to me, what is your opinion tkuratomi?
have you tried to name your inventory "hosts" and to store it at
/etc/ansible ? so you will not have to make the -i thing when you want to
run your playbook
Post by Юра Фролов
втПрМОк, 21 Оюля 2015 г., 16:12:48 UTC+3 пПльзПватель Guillaume Querso
Post by Guillaume Querso
As suggested by the documentation (
http://docs.ansible.com/ansible/intro_configuration.html#sudo-user ), i
would say the remote. just to be clear, your remote is a Linux/Unix
machine? double check your indentation in your playbook to be sure nothing
is wrong here.
can you try: ansible 10.95.46.117 -m ping
Maybe consider to upgrade your ansible version (and your ubuntu)
What i don't understand is that you have an error related to syntax while
i can't find anything unusual..
My machine Linux on both side (Ubuntu 14.10).
c# ping 10.95.46.117
PING 10.95.46.117 (10.95.46.117) 56(84) bytes of data.
64 bytes from 10.95.46.117: icmp_seq=1 ttl=64 time=0.682 ms
64 bytes from 10.95.46.117: icmp_seq=2 ttl=64 time=0.404 ms
^C
--- 10.95.46.117 ping statistics ---
# ansible 10.95.46.117 -m ping
ERROR: Invalid ini entry: This - need more than 1 value to unpack
I have standard repository for Ubuntu. I have latest version ansible.
# ansible --version
ansible 1.7.2
# apt-cache showpkg ansible
Package: ansible
1.7.2+dfsg-1
Can you upload your actual inventory file somewhere for us to download and
Post by Guillaume Querso
take a look? I've just tested and one way that error can happen is if
there's trailing, non-ascii whitespace
inventory file <https://sites.google.com/site/vrnunit/inventory>
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cfcb1f42-a268-49c8-b9e2-cc4397af6d9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Toshio Kuratomi
2015-07-30 20:55:39 UTC
Permalink
Post by Юра Фролов
Post by Toshio Kuratomi
Can you upload your actual inventory file somewhere for us to download and
take a look? I've just tested and one way that error can happen is if
there's trailing, non-ascii whitespace
inventory file
Very first line of this inventory file has:

w This is the default ansible 'hosts' file.

Looks like the "#" was replaced with a "w" at some point. I get the
same error you do until I replace the "w" with a "#".

-Toshio
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAG9juErC9ecVaie4cu2VO1BGBTbA7yLdBcNtgbB_uYEckky4Zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-22 08:40:21 UTC
Permalink
Post by Guillaume Querso
have you tried to name your inventory "hosts" and to store it at
/etc/ansible ?
so you will not have to make the -i thing when you want to run your
playbook
I did not do it.


Which version is now ansible current version for Ubuntu 14.10? Which
repositories ansible is now available with latest version?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8fc0d973-6d5b-49ad-8cd2-a43d2084cec6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Юра Фролов
2015-07-30 05:45:34 UTC
Permalink
Are there any fresh ideas? I'm confused, if everything is correct, why does
not work?
Which repository can use for upgrade ansible?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ebd0a020-cd34-4834-b772-01ba1a506920%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Martin
2015-07-30 08:25:44 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...