# New GCE Fact module

**URL:** <https://forum.ansible.com/t/new-gce-fact-module/15588>\
**Category:** Ansible Developer\
**Created:** [July 1, 2014, 8:03pm UTC](https://forum.ansible.com/t/new-gce-fact-module/15588 "2014-07-01T20:03:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Olliver](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Mark\_Olliver](https://forum.ansible.com/u/Mark_Olliver)\
**Post date:** [July 1, 2014, 8:03pm UTC](https://forum.ansible.com/t/new-gce-fact-module/15588/1 "2014-07-01T20:03:06Z")

</div>

Hi,

I am trying to write a fact module to read the Google Compute Engine Metadata. So far I have the following script: [https://gist.github.com/pixie79/d5399bbdc9df7e68fb4e](https://gist.github.com/pixie79/d5399bbdc9df7e68fb4e)

This works fine when I run it via: hacking/test-module -m /opt/ansible/modules/gce\_meta -a gcemeta="dc,test"

However, if i try and run it via my playbook I get the following error:

ansible-playbook -M /opt/ansible/modules/ -i /opt/ansible/plugins/inventory/gce.py deploy.yml  
ERROR: gce\_meta is not a legal parameter in an Ansible Playbook

My deploy.yml looks like this:

---

<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 1, 2014, 10:09pm UTC](https://forum.ansible.com/t/new-gce-fact-module/15588/2 "2014-07-01T22:09:33Z")

</div>

Hi Mark,

It sounds like your module is not in your configured ansible library path (ansible.cfg) or in a “./library” directory in your playbook or role.

You may also have some identation errors, but that may just be from copy/paste.

---

<div class="post-metadata">

**Author:** ![Jesse\_Keating](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@Jesse\_Keating](https://forum.ansible.com/u/Jesse_Keating)\
**Post date:** [July 1, 2014, 11:38pm UTC](https://forum.ansible.com/t/new-gce-fact-module/15588/3 "2014-07-01T23:38:17Z")

</div>

This usually indicates a whitespace problem. Your “gce\_meta” is being seen at an indentation level outside of the task definition.

I can’t tell from your email because formatting of whitespace is lost, but can you put up a gist of your deploy.yml? I suspect you need to align the gce\_meta: line so that it starts so that the g is right under the “n” of name.

-jlk
