Is there a way to create different repository based on a condition in the same task in Ansible playbook?
Advertisements I am trying to shorten the number of tasks I have in my playbook. I am creating a yum repository on Linux hosts and adding a different baseurl depending on the OS version. It looks like this: vars: my_version: "{{ hostvars[inventory_hostname].ansible_distribution | int }}" – name: create mcrepo yum repo yum_repository: name: mcrepo description:… Read More Is there a way to create different repository based on a condition in the same task in Ansible playbook?