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:
|
- block:
|
||||||
|
|
||||||
|
- name: gather package facts
|
||||||
|
package_facts:
|
||||||
|
manager: auto
|
||||||
|
|
||||||
- name: check if atomic
|
- name: check if atomic
|
||||||
stat:
|
stat:
|
||||||
path: /run/ostree-booted
|
path: /run/ostree-booted
|
||||||
|
@ -21,12 +25,9 @@
|
||||||
|
|
||||||
- name: install prereqs
|
- name: install prereqs
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ DEFAULT_PKGS | difference(ansible_facts.packages) }}"
|
||||||
state: installed
|
state: installed
|
||||||
with_items:
|
when: (ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Fedora"] and not is_atomic)
|
||||||
- libselinux-python
|
|
||||||
- sudo
|
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Fedora"] and not is_atomic
|
|
||||||
|
|
||||||
- name: enable fastestmirror (fedora - non-atomic)
|
- name: enable fastestmirror (fedora - non-atomic)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -55,14 +56,6 @@
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
register: hostname_change
|
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
|
- name: remove requiretty
|
||||||
lineinfile:
|
lineinfile:
|
||||||
regexp: '^\w+\s+requiretty'
|
regexp: '^\w+\s+requiretty'
|
||||||
|
@ -75,5 +68,11 @@
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux"] and not is_atomic
|
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:
|
tags:
|
||||||
- bootstrap
|
- bootstrap
|
||||||
|
|
Loading…
Reference in a new issue