-
Notifications
You must be signed in to change notification settings - Fork 1
/
rhel7-headless-vm.yml
104 lines (94 loc) · 2.32 KB
/
rhel7-headless-vm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
- name: RHEL7 Headless VM
hosts: rhel7headless
vars:
non_root_user: admiller
tasks:
- name: Package Install - RHEL7
yum:
state: installed
name:
- tmux
- irssi
- mutt
- git
- vim-enhanced
- aspell
- gcc
- gcc-c++
- automake
- autoconf
- make
- cmake
- libtool
- setools-console
- policycoreutils-python
- setroubleshoot
- setroubleshoot-plugins
- setroubleshoot-server
- krb5-workstation
- pcp-system-tools
- lm_sensors
- tuned
- tuned-utils
- iotop
- procps-ng
- firewalld
- selinux-policy-doc
- nmap
- podman
- skopeo
- buildah
- '@base'
# NOTE: Requires `ansible-galaxy install geerlingguy.repo-epel
- name: Install EPEL8
import_role:
name: 'geerlingguy.repo-epel'
- name: Package Install - EPEL8
yum:
state: installed
name:
- mock
- htop
- mosh
- tig
- fedpkg
- fpaste
- ack
- xsel
- python2-pip
- python2-virtualenv
- python-virtualenvwrapper
- name: Ensure SELinux Enforcing
selinux:
policy: targeted
state: enforcing
- name: Enable container_manage_cgroup for running systemd in podman containers
seboolean:
name: container_manage_cgroup
state: true
persistent: true
- name: Set container registry settings
copy:
src: files/registries.conf
dest: /etc/containers/registries.conf
- name: Make sure non_root_user user is in mock
user:
name: "{{ non_root_user }}"
groups: mock
append: yes
- name: Allow non-root user access to NetworkManager
template:
src: templates/network_manager_polkit.j2
dest: /etc/polkit-1/rules.d/10-network-manager.pkla
notify:
- reload polkit
- name: enable journald persistent storage
file:
path: /var/log/journal
state: directory
handlers:
- name: reload polkit
service:
name: polkit
state: restarted