volanja/ansible_spec

host-exclusions do not work

rndmh3ro opened this issue · 1 comments

When excluding hosts from the playbook, ansible_spec throws an error:

- name: foo
  hosts: server_foo:!other_host
  user: root
  gather_facts: True
  roles:
  - foo
[root@server ansible]# rake -T --trace
rake aborted!
NoMethodError: undefined method `each' for #<String:0x00000001751a38>
/etc/ansible/Rakefile:12:in `block (2 levels) in <top (required)>'
/etc/ansible/Rakefile:11:in `each'
/etc/ansible/Rakefile:11:in `block in <top (required)>'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task_manager.rb:209:in `in_namespace'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/dsl_definition.rb:147:in `namespace'
/etc/ansible/Rakefile:10:in `<top (required)>'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'

I thought that I wanted to correspond in the past, but I have not been able to respond yet.
This issue has been marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
Thank you for your contributions.