Why Does This Fail

23 views
Skip to first unread message

Douglas Duckworth

unread,
Oct 12, 2017, 3:39:26 PM10/12/17
to ansible...@googlegroups.com
Top-level nodes.yml:

---
- hosts: "{{ hosts }}"
  roles: 
     - { role: lsssd, when: inventory_hostname not in (groups['edisonnodes']|union(groups['pugnodes_old'])) }
    - nodes
  user: root 
  gather_facts: True

Error:

The offending line appears to be:

  roles:
    - { role: lsssd, when: inventory_hostname not in (groups['edisonnodes']|union(groups['pugnodes_old'])) }
                                    ^ here

exception type: <class 'yaml.scanner.ScannerError'>
exception: while scanning for the next token
found character that cannot start any token
  in "<unicode string>", line 4, column 76

I have tried various changes but nothing seems to work.  

Thanks greatly!


Thanks,

Douglas Duckworth, MSc, LFCS
HPC System Administrator
Physiology and Biophysics
Weill Cornell Medicine

Kai Stian Olstad

unread,
Oct 12, 2017, 3:56:35 PM10/12/17
to ansible...@googlegroups.com
On 12. okt. 2017 21:39, Douglas Duckworth wrote:
> *Top-level nodes.yml:*
>
> ---
> - hosts: "{{ hosts }}"
> roles:
> - { role: lsssd, when: inventory_hostname not in
> (groups['edisonnodes']|union(groups['pugnodes_old'])) }
> - nodes
> user: root
> gather_facts: True
>

<snip />

>
> I have tried various changes but nothing seems to work.
Have you tried

roles:
- role: lsssd
when: inventory_hostname not in
(groups['edisonnodes']|union(groups['pugnodes_old']))


--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages