68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
---
|
|
- name: Group hosts by platform
|
|
hosts: all
|
|
tags:
|
|
- always
|
|
pre_tasks:
|
|
- include_tasks: tasks/meta/runtime-group-determination.yaml
|
|
|
|
|
|
- name: Bootstrap remote ansible environment
|
|
hosts: linux
|
|
gather_facts: false
|
|
tags:
|
|
- always
|
|
tasks:
|
|
- include_tasks: tasks/meta/bootstrap-remote-env.yaml
|
|
|
|
|
|
- name: Configure common settings
|
|
hosts: linux
|
|
gather_facts: false
|
|
vars_files:
|
|
- vars/packages.yaml
|
|
tasks:
|
|
- name: Set hostname
|
|
become: true
|
|
ansible.builtin.hostname:
|
|
name: "{{ inventory_hostname }}"
|
|
use: systemd
|
|
|
|
- name: Install global bash config
|
|
become: true
|
|
ansible.builtin.copy:
|
|
src: global.sh
|
|
dest: /etc/profile.d/ZZ-skylab-global.sh
|
|
owner: root
|
|
group: "{{ ansible_user }}"
|
|
mode: 0644
|
|
|
|
- name: Install EPEL repository config
|
|
when: ansible_distribution == "Rocky"
|
|
become: true
|
|
ansible.builtin.yum_repository:
|
|
name: epel
|
|
description: Extra Packages for Enterprise Linux
|
|
baseurl: https://download.fedoraproject.org/pub/epel/$releasever{{ '/Everything' if ansible_distribution_major_version == '8' else '' }}/$basearch/
|
|
|
|
- name: Install EPEL GPG key
|
|
when: ansible_distribution == "Rocky"
|
|
become: true
|
|
ansible.builtin.rpm_key:
|
|
state: present
|
|
key: https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
|
|
|
|
- name: Install universal packages
|
|
when: ansible_distribution == "Rocky"
|
|
become: true
|
|
ansible.builtin.dnf:
|
|
name: "{{ skylab_packages_global + skylab_packages_rocky }}"
|
|
state: present
|
|
update_cache: true
|
|
|
|
|
|
- import_playbook: update.yaml
|
|
|
|
|
|
- import_playbook: configure.yaml
|