This repository has been archived on 2023-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
skylab-ansible/playbooks/provision.yaml

59 lines
1.5 KiB
YAML
Raw Normal View History

2021-09-06 02:54:48 +00:00
---
- name: Group hosts by platform
hosts: all
tags:
- always
pre_tasks:
- include_tasks: tasks/meta/runtime-group-determination.yaml
2021-09-06 02:54:48 +00:00
- name: Bootstrap remote ansible environment
hosts: linux
gather_facts: false
2021-09-06 02:54:48 +00:00
tags:
- always
tasks:
- include_tasks: tasks/meta/bootstrap-remote-env.yaml
2021-09-06 02:54:48 +00:00
- name: Configure common settings
hosts: linux
gather_facts: false
2021-09-06 02:54:48 +00:00
tasks:
- name: Set hostname
become: true
ansible.builtin.hostname:
name: "{{ skylab_networking.hostname | default(inventory_hostname) }}"
2021-09-06 02:54:48 +00:00
use: systemd
- name: Disable case-sensitive tab-completion
become: true
ansible.builtin.lineinfile:
line: set completion-ignore-case On
path: /etc/inputrc
state: present
create: true
2021-09-06 02:54:48 +00:00
- 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 }}
2021-09-06 03:19:41 +00:00
- import_playbook: update.yaml
- import_playbook: configure.yaml