This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
/
main.yml
100 lines (87 loc) · 2.42 KB
/
main.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
---
- name: Load OS specific variables
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml'
- '{{ ansible_facts.distribution }}.yml'
- '{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml'
- '{{ ansible_facts.os_family }}.yml'
paths:
- 'vars'
tags:
- always
- name: include_tasks to build Galaxy WebUI if galaxy-ng is among the plugins
include_tasks:
file: galaxy_ui.yml
apply:
become: true
when: pulp_install_plugins_normalized['galaxy-ng'] is defined
- import_tasks: install_basic_packages.yml
become: true
- name: "Add {{ pulp_user }} to systemd-journal group"
user:
name: "{{ pulp_user }}"
groups: systemd-journal
append: yes
become: true
- import_tasks: install_podman.yml
become: true
when: pulp_devel_install_podman
- import_tasks: install_docs_requirements.yml
become: true
become_user: '{{ pulp_user }}'
- name: Include bashrc
include_tasks:
file: bashrc.yml
apply:
become: true
become_user: "{{ developer_user }}"
- import_tasks: config_files.yml
become: true
become_user: "{{ developer_user }}"
- import_tasks: pulp_cli.yml
become: true
become_user: "{{ developer_user }}"
- name: Initialize galaxy data
shell: >-
source {{ developer_user_home }}/.bashrc.d/alias.bashrc
&& source {{ developer_user_home }}/.bashrc.d/venv.bashrc
&& pdbreset
args:
executable: /bin/bash
become: true
become_user: "{{ developer_user }}"
when: pulp_install_plugins_normalized['galaxy-ng'] is defined
- name: Set the message of the day
copy:
src: motd
dest: /etc/motd
become: true
- name: Check SELinux logs
stat:
path: "/var/log/audit/audit.log"
register: selinuxlog
- name: SELinux Analyze
shell: |
set -o pipefail
sealert --analyze=/var/log/audit/audit.log | grep "SELinux is preventing"
args:
# Debian defaults to bourne, but it doesn't understand pipefail.
executable: /bin/bash
changed_when: false
register: selinux_analyze
check_mode: false
become: true
when:
- selinuxlog.stat.exists
- ansible_facts.os_family == "RedHat"
- name: SELinux status
debug:
var: selinux_analyze.stdout_lines
when:
- ansible_facts.os_family == "RedHat"
- selinuxlog.stat.exists
- selinux_analyze.stdout
...