Fix myriad bugs in playbooks
Update inventory
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
- name: Load package variables
|
||||
include_vars:
|
||||
file: packages.yml
|
||||
|
||||
---
|
||||
- name: Install global packages using YUM
|
||||
become: true
|
||||
yum:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Enable Extra Packages for Enterprise Linux
|
||||
become: true
|
||||
yum_repository:
|
||||
@@ -23,4 +24,5 @@
|
||||
regex: enabled=1
|
||||
line: enabled=0
|
||||
path: /etc/yum/pluginconf.d/subscription-manager.conf
|
||||
create: yes
|
||||
state: present
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
- name: Load package variables
|
||||
include_vars:
|
||||
file: packages.yml
|
||||
|
||||
---
|
||||
- name: Install global packages using DNF
|
||||
become: true
|
||||
dnf:
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- name: Make .network files
|
||||
become: true
|
||||
template:
|
||||
src: dot.network.j2
|
||||
src: network.j2
|
||||
dest: "/etc/systemd/network/{{ item.key }}.network"
|
||||
with_dict: "{{ networking }}"
|
||||
|
||||
|
||||
15
tasks/users-preprocessing.yml
Normal file
15
tasks/users-preprocessing.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Pre-processing
|
||||
tags: always
|
||||
block:
|
||||
- name: Load users
|
||||
include_vars:
|
||||
file: users.yml
|
||||
- name: Reconcile user targets with host targets to get host users
|
||||
set_fact:
|
||||
local_users: "{{ local_users | default([]) + [item if item.targets | intersect(targets) else None] }}"
|
||||
with_items: "{{ users }}"
|
||||
- name: Get administrative users
|
||||
set_fact:
|
||||
local_admin_users: "{{ local_admin_users | default([]) + [item.name if item.admin else None] }}"
|
||||
with_items: "{{ local_users | difference([None]) }}"
|
||||
Reference in New Issue
Block a user