Add debian common role
This commit is contained in:
23
common-debian/tasks/facts.yml
Normal file
23
common-debian/tasks/facts.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: create local facts directory
|
||||
file:
|
||||
dest: /etc/ansible/facts.d
|
||||
state: directory
|
||||
recurse: yes
|
||||
|
||||
- name: install local facts
|
||||
template:
|
||||
src: "etc/ansible/facts.d/{{ item }}.fact.j2"
|
||||
dest: "/etc/ansible/facts.d/{{ item }}.fact"
|
||||
mode: 0755
|
||||
register: installed_facts
|
||||
loop: "{{ custom_facts }}"
|
||||
|
||||
- name: regather all facts
|
||||
setup:
|
||||
gather_subset: "all,local"
|
||||
when: installed_facts.changed
|
||||
|
||||
- name: set moe_release fact
|
||||
set_fact:
|
||||
moe_release: "{{ ansible_local.moe_release }}"
|
Reference in New Issue
Block a user