Hi,
I am trying to use the os_server_facts module, but I get a syntax error:
The inventory file "oshost" contains only the following line:
localhost ansible_connection=local
The playbook "os_server_facts.yml" is a simple as the example given in the
documentation:
- os_server_facts:
server: W1
- debug:
var: openstack_servers
And this is what I get:
admin:~/temp <admin@cvm01485:~/temp>> ansible-playbook -i oshost
os_server_facts.yml
ERROR! Syntax Error while loading YAML.
The error appears to have been in '/home/admin/temp/os_server_facts.yml':
line 2, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- os_server_facts:
server: W1
^ here
admin:~/temp <admin@cvm01485:~/temp>>
By the way, the OpemStack environment variables are loaded from the RC
file. Other cloud modules, like os_server, are working properly:
admin:~/temp <admin@cvm01485:~/temp>> cat os_server_test.yml
# Test
- name: Launch an instance
gather_facts: no
tasks:
- name: Launch a "Ubuntu 14 LTS" instance
os_server:
state: present
name: Test01
image: a79d8041-b92b-49cc-82c1-fa354469bde0
flavor: 4488da6d-6173-4112-8870-9f76d138ad00
key_name: 'oskey'
nics:
- net-id: 00d39765-718d-43c3-8256-6c73d4bb3752
admin:~/temp <admin@cvm01485:~/temp>>
Any idea, why the os_server_facts returns a syntax error?
Regards
Stavros
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/aaa9b09a-c4f9-4415-8f6c-88d4971ab31a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.