Hi Michael,

I'll provide a short example to prove my point (b11be68249):
$ cat whatever.yml
---
- hosts: localhost
  gather_facts: false
  vars:
    foo: bar
  tasks:
  - name: test
    local_action:
    module: copy
    src: ./src
    dest: ./dest

$ ansible-playbook whatever.yml
ERROR: dest is not a legal parameter in an Ansible task or handler

Whereas:
$ cat whatever.yml
---
- hosts: localhost
  gather_facts: false
  vars:
    foo: bar
  tasks:
  - name: test
    local_action:
      module: copy
      src: ./src
      dest: ./dest

$ ansible-playbook whatever.yml

PLAY [localhost] 
**************************************************************

TASK: [test] 
******************************************************************
ok: [localhost -> 127.0.0.1]

PLAY RECAP 
********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0

I'm sorry you feel like that way about the link. I know it's sometimes easy 
to oversee the local_action attribute. It is mostly used (although it's not 
the only way) when one calls SDK/APIs through localhost.

Can you perhaps show how and where you include this create_web.yml of 
yours? Perhaps the scope is not set right.

Cheers,
Dan.


On Monday, 23 March 2015 18:14:40 UTC+1, Michael Bushey wrote:
>
> Dan, 
>
> Thanks for your response. Since you feel my spacing is wrong, please 
> let me know what is wrong. Proving a link to yaml spacing whitepaper 
> is not helping. How do you propose that incorrect spacing will result 
> in the error of "ERROR: datacenter is not a legal parameter at this 
> level in an Ansible Playbook"? Typically spacing errors result in 
> something like "ERROR: Syntax Error while loading YAML script". 
>
> Michael 
>
> On Sun, Mar 22, 2015 at 1:53 PM, Dan Vaida <[email protected] 
> <javascript:>> wrote: 
> > You're missing indentation. Take a look at the examples on the module 
> page. 
> > Here's a good explanation: http://yaml.org/spec/current.html#id2519916 
> > 
> > On Wednesday, 18 March 2015 19:38:02 UTC+1, Michael Bushey wrote: 
> >> 
> >> I'm attempting to use the first example on page: 
> >> http://docs.ansible.com/linode_module.html 
> >> 
> >> ⇒ ansible-playbook --version 
> >> ansible-playbook 1.7.2 
> >> 
> >> ⇒ ansible-playbook -i ../hosts create_web.yml 
> >> ERROR: datacenter is not a legal parameter at this level in an Ansible 
> >> Playbook 
> >> 
> >>  ⇒ cat create_web.yml 
> >> --- 
> >> - local_action: 
> >>   module: linode 
> >>   api_key: 'Myapikeyishere' 
> >>   name: web1 
> >>   plan: 2 
> >>   datacenter: 2 
> >>   distribution: 130 
> >>   password: 'mypasword' 
> >> 
> >> any ideas? 
> >> 
> >> 
> > -- 
> > You received this message because you are subscribed to a topic in the 
> > Google Groups "Ansible Project" group. 
> > To unsubscribe from this topic, visit 
> > 
> https://groups.google.com/d/topic/ansible-project/0S1OeNZj_Qk/unsubscribe. 
>
> > To unsubscribe from this group and all its topics, send an email to 
> > [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/bc512bbb-cabc-442c-b20a-2cbf7ee4d7bc%40googlegroups.com.
>  
>
> > 
> > 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 [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/5febd0d1-9204-4dd1-a505-c3b4788c02e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to