---
- import_playbook: dependencies.yml
- hosts: all
name: Init
tasks:
- name: Set hostname
become: true
hostname:
name: "{{ default_host if default_host is defined else inventory_hostname }}"
- name: Install global bashrc
copy:
src: bashrc.sh
dest: /etc/profile.d/30-omni-bashrc.sh
mode: 0644
- name: Install SSH Banner
template:
src: motd.j2
dest: /etc/issue.net
- name: Configure SSH banner
lineinfile:
path: /etc/ssh/sshd_config
regexp: '#Banner none'
line: 'Banner /etc/issue.net'
name: System packages
- name: Load package variables
include_vars:
file: packages.yml
- import_tasks: tasks/centos/repositories.yml
when: ansible_distribution == "CentOS"
- import_tasks: tasks/centos/packages.yml
- import_tasks: tasks/fedora/packages.yml
when: ansible_distribution == "Fedora"
# - import_tasks: tasks/debian/packages.yml
# when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
- import_playbook: update-system.yml
name: Replace NetworkManager with systemd-networkd
- name: Install systemd-networkd
when: enable_networkd == true
block:
- import_tasks: tasks/centos/networkd.yml
- import_tasks: tasks/fedora/networkd.yml
# - import_tasks: common/debian/networkd.yml
- import_tasks: tasks/networkd.yml
- import_playbook: update-users-local.yml
- hosts: vms
name: Install ovirt agent
- name: Install ovirt-agent
yum:
name: ovirt-guest-agent
state: latest