On 5/2/20 2:42 PM, David Foley wrote:
> Not sure if it's possible with ansbile but with Salt you can set Grains and
> do if else statements based on those grains
>
> {% if role[host1] }
> - role: host1
> {% elif role[hoat2] %}
> -role: host 2
> {%endif%}
>
> I would look up condition s for ansible
>
Don't know about virtual grains, but you can apply when: conditions
- role: role1
when: "'role1' in group_names"
Regards
Racke
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a7a083d1-2a99-71f3-8674-a74f6d637b17%40linuxia.de.
signature.asc
Description: OpenPGP digital signature
