SolidStateSubether/Ansible/roles/base/tasks/main.yml
2018-05-27 23:01:28 -04:00

30 lines
882 B
YAML

---
- name: gather os specific variables
include_vars: "{{ item }}"
with_first_found:
- "../defaults/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | int }}.yml"
- "../defaults/{{ ansible_distribution | lower }}.yml"
- "../defaults/{{ ansible_os_family | lower }}.yml"
- "../defaults/defaults.yml"
tags: variables
- include_tasks: "{{ item }}"
with_first_found:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | int }}.yml"
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}.yml"
- defaults.yml
- name: Get passwd file
shell: grep -r "^{{ user }}" /etc/passwd
register: grep_user
failed_when: false
- block:
- name: Apply common tasks
include_tasks: common.yml
- name: Applying fish tasks
include_tasks: fish.yml
when: grep_user.stdout