Files
ansible-freeipa/roles/ipaserver/tasks/main.yml
Grzegorz Grasza 7a23531047 Use ansible_facts variable
Without this change the "Import variables specific to distribution"
tasks fail with "Could not find file on the Ansible Controller..."
on environments with inject facts disabled.

This changes the tests to run with ansible with
inject_facts_as_vars = false and fixes other roles and playbooks.
2021-03-19 13:55:44 +01:00

19 lines
618 B
YAML

---
# tasks file for ipaserver
- name: Import variables specific to distribution
include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}.yml"
- "vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
- "vars/{{ ansible_facts['distribution'] }}.yml"
- "vars/default.yml"
- name: Install IPA server
include_tasks: install.yml
when: state|default('present') == 'present'
- name: Uninstall IPA server
include_tasks: uninstall.yml
when: state|default('present') == 'absent'