Skip to content
Snippets Groups Projects
Commit 2c68783d authored by Thomas Schneider's avatar Thomas Schneider
Browse files

basic-system: RHEL support

parent e17e04fa
No related branches found
No related tags found
No related merge requests found
......@@ -25,3 +25,11 @@
shell: # noqa 303
chdir: /etc
cmd: git rm --cached -r -- pve && git commit -m "'Remove pve directory'"
- name: etckeeper initial commit
command: etckeeper commit "Initial import"
- name: flush journal
systemd:
name: systemd-journal-flush.service
state: restarted
---
- name: ensure lsb release information is available
apt:
name: lsb-release
state: present
notify:
- gather minimal standard facts once again
tags:
- lsb
- meta: flush_handlers
- name: Check for Proxmox
stat:
path: /etc/pve
register: pve_present
tags:
- etckeeper
- name: Ignore Proxmox config in etckeeper
lineinfile:
path: /etc/.gitignore
line: /pve
create: true
when: etckeeper and pve_present.stat.exists
notify:
- Remove pve directory from etckeeper repo
tags:
- etckeeper
......@@ -19,6 +19,7 @@
when:
- ansible_distribution_major_version|int(default=99) < 11
- journal_persistent_with_package
- is_debian
tags:
- syslog
- journal
......@@ -27,11 +28,12 @@
file:
path: /var/log/journal
state: directory
when:
- ansible_distribution_major_version|int(default=99) < 11
- not journal_persistent_with_package
when: >-
not is_debian or (ansible_distribution_major_version|int(default=99) < 11
and not journal_persistent_with_package)
notify:
- configure journal directory
- flush journal
tags:
- syslog
- journal
......@@ -44,6 +46,7 @@
dpkg_options: "force-confdef,force-confold,force-depends"
when:
- syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn
- is_debian
tags:
- syslog
......
......@@ -10,44 +10,28 @@
tags:
- mount
- name: ensure lsb release information is available
apt:
name: lsb-release
state: present
notify:
- gather minimal standard facts once again
tags:
- lsb
- meta: flush_handlers
- name: Check for Proxmox
stat:
path: /etc/pve
register: pve_present
tags:
- etckeeper
- name: Ignore Proxmox config in etckeeper
lineinfile:
path: /etc/.gitignore
line: /pve
create: true
when: etckeeper and pve_present.stat.exists
notify:
- Remove pve directory from etckeeper repo
tags:
- etckeeper
- include_tasks: "{{ ansible_distribution_file_variety|lower }}.yml"
- name: Install etckeeper
apt:
package:
name: etckeeper
state: present
when: etckeeper
tags:
- etckeeper
- name: Initialise etckeeper
command:
cmd: etckeeper init
creates: /etc/.git
when: etckeeper
notify:
- etckeeper initial commit
tags:
- etckeeper
- name: Uninstall etckeeper
apt:
package:
name: etckeeper
state: absent
when: not etckeeper
......
......@@ -11,7 +11,7 @@
- dns
- name: ensure dbus is installed, since hostnamectl needs this
apt:
package:
name: dbus
state: present
tags:
......@@ -93,7 +93,7 @@
- sysctl
- name: ensure openssl is installed
apt:
package:
name:
- openssl
- ca-certificates
......
---
### currently broken
### https://bugzilla.redhat.com/show_bug.cgi?id=2088871
# - name: ensure lsb release information is available
# dnf:
# name: redhat-lsb-core
# state: present
# notify:
# - gather minimal standard facts once again
# tags:
# - lsb
# - meta: flush_handlers
{% if is_debian %}
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
{% elif is_rhel %}
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
{% endif %}
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
......
......@@ -21,7 +21,7 @@ delaycompress
# packages drop log rotation information into this directory
include /etc/logrotate.d
{% if ansible_distribution_major_version|int(default=99) < 10 %}
{% if is_debian and ansible_distribution_major_version|int(default=99) < 10 %}
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment