bootstrap - add package_facts, remove earlyoom if present
This commit is contained in:
parent
1f4154a5a0
commit
271f0a27a5
1 changed files with 12 additions and 13 deletions
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
- block:
|
||||
|
||||
- name: gather package facts
|
||||
package_facts:
|
||||
manager: auto
|
||||
|
||||
- name: check if atomic
|
||||
stat:
|
||||
path: /run/ostree-booted
|
||||
|
@ -21,12 +25,9 @@
|
|||
|
||||
- name: install prereqs
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name: "{{ DEFAULT_PKGS | difference(ansible_facts.packages) }}"
|
||||
state: installed
|
||||
with_items:
|
||||
- libselinux-python
|
||||
- sudo
|
||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Fedora"] and not is_atomic
|
||||
when: (ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Fedora"] and not is_atomic)
|
||||
|
||||
- name: enable fastestmirror (fedora - non-atomic)
|
||||
lineinfile:
|
||||
|
@ -55,14 +56,6 @@
|
|||
name: "{{ inventory_hostname }}"
|
||||
register: hostname_change
|
||||
|
||||
- name: restart hostname-change sensitive services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
with_items:
|
||||
- rsyslog
|
||||
when: (hostname_change is changed) and (ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "Fedora"] and not is_atomic)
|
||||
|
||||
- name: remove requiretty
|
||||
lineinfile:
|
||||
regexp: '^\w+\s+requiretty'
|
||||
|
@ -75,5 +68,11 @@
|
|||
state: latest
|
||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux"] and not is_atomic
|
||||
|
||||
- name: remove earlyoom
|
||||
package:
|
||||
name: earlyoom
|
||||
state: absent
|
||||
when: ('earlyoom' in ansible_facts.packages)
|
||||
|
||||
tags:
|
||||
- bootstrap
|
||||
|
|
Loading…
Reference in a new issue