Add 'roles/ensure_repo_fdragon/' from commit 'b1a07a88f4867f8e27e97c42fc960c69b18f3c61'
git-subtree-dir: roles/ensure_repo_fdragon git-subtree-mainline:29de98f52agit-subtree-split:b1a07a88f4
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
---
|
||||
# tasks file for ensure_repo_fdragon
|
||||
- name: 'include variables'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
include_vars:
|
||||
file: '{{ lookup("first_found", findme ) }}'
|
||||
name: 'ensure_repo_fdragon'
|
||||
vars:
|
||||
findme:
|
||||
files:
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
|
||||
- '{{ ansible_distribution }}-default.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
|
||||
- '{{ ansible_os_family }}-default.yml'
|
||||
- 'default.yml'
|
||||
paths:
|
||||
- '../vars/'
|
||||
errors: 'ignore'
|
||||
- name: 'package discovery'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- packages is not defined
|
||||
ansible.builtin.package_facts:
|
||||
- name: 'service discovery'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- services is not defined
|
||||
ansible.builtin.service_facts:
|
||||
- name: 'ensure packages'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ensure_repo_fdragon is defined
|
||||
- ensure_repo_fdragon.package_list is defined
|
||||
- ensure_repo_fdragon.package_list is iterable
|
||||
- packages[item.name] is not defined
|
||||
ansible.builtin.package:
|
||||
disable_gpg_check: '{{ item.disable_gpg_check | default(omit) }}'
|
||||
name: '{{ item.url }}'
|
||||
state: '{{ item.state }}'
|
||||
loop: '{{ ensure_repo_fdragon.package_list }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }} will be {{ item.state }}'
|
||||
notify:
|
||||
- 'ensure_repo_fdragon.package_facts'
|
||||
- 'ensure_repo_fdragon.service_facts'
|
||||
ansible.builtin.service:
|
||||
enabled: '{{ item.enabled }}'
|
||||
name: '{{ item.name }}'
|
||||
state: '{{ item.state }}'
|
||||
loop: '{{ ensure_repo_fdragon.service_list }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }} will be {{ item.state }}'
|
||||
notify:
|
||||
- 'ensure_repo_fdragon.package_facts'
|
||||
- 'ensure_repo_fdragon.service_facts'
|
||||
- name: 'flush handlers'
|
||||
meta: 'flush_handlers'
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user