Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aguia-pescadora-ansible-playbooks/tarefa/firewal falha no primeiro teste ("Ubuntu? Debian?") em função de gather_facts: no #35

Open
fititnt opened this issue Jul 28, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@fititnt
Copy link
Member

fititnt commented Jul 28, 2019

Reportado por @cdiegosr


A tarefa aguia-pescadora-ansible-playbooks/tarefa/firewall disponibilizada em https://github.com/EticaAI/aguia-pescadora-ansible-playbooks/tree/master/tarefa/firewall (e cujo arquivo exato antes de correção pode ser vista em https://github.com/EticaAI/aguia-pescadora-ansible-playbooks/blob/22d8d19ce7271377f2fd22cb5e1be43f1744ce7f/tarefa/firewall/firewall.yml) pode dar um falso positivo no primeiro teste quando testado em certas situações. Mesmo o host de destino sendo um Ubuntu, ele falha.

- hosts: all
  gather_facts: no
  tasks:

  - name: Ubuntu? Debian?
    fail:
      msg: "Ubuntu/Debian fail"
    when: ansible_distribution != 'Debian' and ansible_distribution != 'Ubuntu'

# ...

Uma das formas que resolve imediatamente sem precisar documentar poderia ser não forçar o gather_facts: no.

@fititnt fititnt added the bug Something isn't working label Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant