Skip to content
Snippets Groups Projects
Commit 1d786bfa authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

Merge branch 'update' into 'master'

update

See merge request tools/ansible/roles/essential!17
parents fec7ab37 57072bb7
No related branches found
No related tags found
No related merge requests found
Showing
with 135 additions and 235 deletions
galaxy_info:
role_name: essential
namespace: dmitriysafronov
author: Dmitriy Safronov <zimniy@cyberbrain.pw>
description: Essential configuration
# company: your company (optional)
......@@ -17,7 +19,7 @@ galaxy_info:
# - CC-BY-4.0
license: LGPL-2.0-or-later
min_ansible_version: 2.9
min_ansible_version: "2.12"
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
......@@ -42,22 +44,16 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- focal
- bionic
- name: Linux Mint
versions:
- uma
- ulyssa
- ulyana
- tricia
- all
- name: Debian
versions:
- bullseye
- buster
- name: Centos
- all
- name: Fedora
versions:
- all
- name: OracleLinux
versions:
- 8-stream
- 8
- all
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
......@@ -71,4 +67,4 @@ dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
allow_duplicates: no
allow_duplicates: false
---
# REPOSITORIES
- name: Setup repositories
include_tasks: repositories.yml
## REPOSITORIES
# Ubuntu
- name: Configure repositories for Ubuntu {{ ansible_distribution_release }}
ansible.builtin.include_tasks: repositories/ubuntu.yml
when: ansible_distribution == 'Ubuntu'
tags: repositories
# Debian
- name: Configure repositories for Debian {{ ansible_distribution_release }}
ansible.builtin.include_tasks: repositories/debian.yml
when: ansible_distribution == 'Debian'
tags: repositories
## ESSENTIAL SETUP
# APT
- name: Install aptitude & debconf-utils using apt
apt:
ansible.builtin.apt:
state: present
update_cache: yes
force_apt_get: yes
install_recommends: no
update_cache: true
force_apt_get: true
install_recommends: false
pkg:
- aptitude
- debconf-utils
# ESSENTIAL PACKAGES
- name: Install packages
apt:
ansible.builtin.apt:
state: present
update_cache: yes
install_recommends: no
update_cache: true
install_recommends: false
pkg:
- bash
- mawk
......
---
- name: Template a file to /etc/apt/sources.list for Debian Buster
copy:
- name: Template a file to /etc/apt/sources.list for Debian {{ ansible_distribution_release }}
ansible.legacy.copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian buster main contrib
deb [arch=amd64] http://deb.debian.org/debian buster-updates main contrib
deb [arch=amd64] http://security.debian.org/debian-security buster/updates main contrib
deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }} main contrib
deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib
deb [arch=amd64] http://security.debian.org/debian-security {{ ansible_distribution_release }}/updates main contrib
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
force: yes
mode: "0644"
force: true
- name: Template a file to /etc/apt/sources.list.d/non-free.list for Debian Buster
copy:
- name: Template a file to /etc/apt/sources.list.d/non-free.list for Debian {{ ansible_distribution_release }}
ansible.legacy.copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian buster non-free
deb [arch=amd64] http://deb.debian.org/debian buster-updates non-free
deb [arch=amd64] http://security.debian.org/debian-security buster/updates non-free
deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }} non-free
deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-updates non-free
deb [arch=amd64] http://security.debian.org/debian-security {{ ansible_distribution_release }}/updates non-free
dest: /etc/apt/sources.list.d/non-free.list
owner: root
group: root
mode: 0644
force: yes
mode: "0644"
force: true
when: apply_non_free is defined and apply_non_free
- name: Template a file to /etc/apt/sources.list.d/backports.list for Debian Buster
copy:
- name: Template a file to /etc/apt/sources.list.d/backports.list for Debian {{ ansible_distribution_release }}
ansible.legacy.copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian buster-backports main contrib
deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
dest: /etc/apt/sources.list.d/backports.list
owner: root
group: root
mode: 0644
force: yes
mode: "0644"
force: true
when: apply_backports is defined and apply_backports
- name: Template a file to /etc/apt/sources.list.d/backports_non-free.list for Debian Buster
copy:
- name: Template a file to /etc/apt/sources.list.d/backports_non-free.list for Debian {{ ansible_distribution_release }}
ansible.legacy.copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian buster-backports non-free
deb [arch=amd64] http://deb.debian.org/debian {{ ansible_distribution_release }}-backports non-free
dest: /etc/apt/sources.list.d/backports_non-free.list
owner: root
group: root
mode: 0644
force: yes
mode: "0644"
force: true
when: apply_backports is defined and apply_backports and apply_non_free is defined and apply_non_free
---
- name: Template a file to /etc/apt/sources.list for Ubuntu {{ ansible_distribution_release }}
ansible.legacy.copy:
content: |
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }} main restricted universe multiverse
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-updates main restricted universe multiverse
deb [arch=amd64] http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted universe multiverse
dest: /etc/apt/sources.list
owner: root
group: root
mode: "0644"
force: true
- name: Template a file to /etc/apt/sources.list.d/backports.list for Ubuntu {{ ansible_distribution_release }}
ansible.legacy.copy:
content: |
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-backports main restricted universe multiverse
dest: /etc/apt/sources.list.d/backports.list
owner: root
group: root
mode: "0644"
force: true
when: apply_backports is defined and apply_backports
---
# Ubuntu
- name: Perform specific setup for Ubuntu, Debian & Linux Mint
include_tasks: ubuntu/main.yml
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' or ansible_distribution == 'Linux Mint'
tags: ubuntu
- name: Perform specific setup for Ubuntu & Debian
ansible.builtin.include_tasks: deb/main.yml
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
tags: deb
# Centos
- name: Perform specific setup for RedHat, Centos, OracleLinux
include_tasks: centos/main.yml
ansible.builtin.include_tasks: rpm/main.yml
when: ansible_distribution == 'CentOS' or ansible_distribution == 'OracleLinux' or ansible_distribution == 'Red Hat Enterprise Linux'
tags: centos
tags: rpm
......@@ -4,10 +4,12 @@
ansible.builtin.dnf:
name: epel-release
state: present
update_cache: yes
update_cache: true
when: apply_epel is defined and apply_epel and (ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux')
- block:
- name: Enable EPEL repo for OracleLinux
when: apply_epel is defined and apply_epel and ansible_distribution == 'OracleLinux'
block:
- name: Enable EPEL GPG key for externel repo
ansible.builtin.rpm_key:
state: present
......@@ -16,5 +18,4 @@
ansible.builtin.dnf:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
state: present
update_cache: yes
when: apply_epel is defined and apply_epel and ansible_distribution == 'OracleLinux'
update_cache: true
---
# Mint
- name: Configure repositories for Linux Mint Uma
include_tasks: repositories/linux_mint/repositories_mint_uma.yml
when: ansible_distribution == 'Linux Mint' and ansible_distribution_release == 'uma'
tags: repositories
- name: Configure repositories for Linux Mint Ulyssa
include_tasks: repositories/linux_mint/repositories_mint_ulyssa.yml
when: ansible_distribution == 'Linux Mint' and ansible_distribution_release == 'ulyssa'
tags: repositories
- name: Configure repositories for Linux Mint Ulyana
include_tasks: repositories/linux_mint/repositories_mint_ulyana.yml
when: ansible_distribution == 'Linux Mint' and ansible_distribution_release == 'ulyana'
tags: repositories
- name: Configure repositories for Linux Mint Tricia
include_tasks: repositories/linux_mint/repositories_mint_tricia.yml
when: ansible_distribution == 'Linux Mint' and ansible_distribution_release == 'tricia'
tags: repositories
# Ubuntu
- name: Configure repositories for Ubuntu Focal
include_tasks: repositories/ubuntu/repositories_ubuntu_focal.yml
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'focal'
tags: repositories
- name: Configure repositories for Ubuntu Bionic
include_tasks: repositories/ubuntu/repositories_ubuntu_bionic.yml
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'bionic'
tags: repositories
# Debian
- name: Configure repositories for Debian Bullseye
include_tasks: repositories/debian/repositories_debian_bullseye.yml
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'bullseye'
tags: repositories
- name: Configure repositories for Debian Buster
include_tasks: repositories/debian/repositories_debian_buster.yml
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'buster'
tags: repositories
---
- name: Template a file to /etc/apt/sources.list for Debian Bullseye
copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian bullseye main contrib
deb [arch=amd64] http://deb.debian.org/debian bullseye-updates main contrib
deb [arch=amd64] http://security.debian.org/debian-security bullseye-security main contrib
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
force: yes
- name: Template a file to /etc/apt/sources.list.d/non-free.list for Debian Bullseye
copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian bullseye non-free
deb [arch=amd64] http://deb.debian.org/debian bullseye-updates non-free
deb [arch=amd64] http://security.debian.org/debian-security bullseye-security non-free
dest: /etc/apt/sources.list.d/non-free.list
owner: root
group: root
mode: 0644
force: yes
when: apply_non_free is defined and apply_non_free
- name: Template a file to /etc/apt/sources.list.d/backports.list for Debian Bullseye
copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian bullseye-backports main contrib
dest: /etc/apt/sources.list.d/backports.list
owner: root
group: root
mode: 0644
force: yes
when: apply_backports is defined and apply_backports
- name: Template a file to /etc/apt/sources.list.d/backports_non-free.list for Debian Bullseye
copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian bullseye-backports non-free
dest: /etc/apt/sources.list.d/backports_non-free.list
owner: root
group: root
mode: 0644
force: yes
when: apply_backports is defined and apply_backports and apply_non_free is defined and apply_non_free
---
- name: Template a file to /etc/apt/sources.list.d/official-package-repositories.list for Linux Mint Tricia
copy:
content: |
deb http://mirror.yandex.ru/linuxmint-packages tricia main upstream import backport
deb http://mirror.yandex.ru/ubuntu bionic main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu bionic-updates main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ bionic partner
dest: /etc/apt/sources.list.d/official-package-repositories.list
owner: root
group: root
mode: 0644
---
- name: Template a file to /etc/apt/sources.list.d/official-package-repositories.list for Linux Mint Ulyana
copy:
content: |
deb http://mirror.yandex.ru/linuxmint-packages ulyana main upstream import backport
deb http://mirror.yandex.ru/ubuntu focal main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu focal-updates main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ focal partner
dest: /etc/apt/sources.list.d/official-package-repositories.list
owner: root
group: root
mode: 0644
---
- name: Template a file to /etc/apt/sources.list.d/official-package-repositories.list for Linux Mint Ulyssa
copy:
content: |
deb http://mirror.yandex.ru/linuxmint-packages ulyssa main upstream import backport
deb http://mirror.yandex.ru/ubuntu focal main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu focal-updates main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ focal partner
dest: /etc/apt/sources.list.d/official-package-repositories.list
owner: root
group: root
mode: 0644
---
- name: Template a file to /etc/apt/sources.list.d/official-package-repositories.list for Linux Mint Uma
copy:
content: |
deb http://mirror.yandex.ru/linuxmint-packages uma main upstream import backport
deb http://mirror.yandex.ru/ubuntu focal main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu focal-updates main restricted universe multiverse
deb http://mirror.yandex.ru/ubuntu focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ focal partner
dest: /etc/apt/sources.list.d/official-package-repositories.list
owner: root
group: root
mode: 0644
---
- name: Template a file to /etc/apt/sources.list for Ubuntu Bionic
copy:
content: |
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb [arch=amd64] http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
force: yes
- name: Template a file to /etc/apt/sources.list.d/backports.list for Ubuntu Bionic
copy:
content: |
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
dest: /etc/apt/sources.list.d/backports.list
owner: root
group: root
mode: 0644
force: yes
when: apply_backports is defined and apply_backports
---
- name: Template a file to /etc/apt/sources.list for Ubuntu Focal
copy:
content: |
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb [arch=amd64] http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
force: yes
- name: Template a file to /etc/apt/sources.list.d/backports.list for Ubuntu Focal
copy:
content: |
deb [arch=amd64] http://ru.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
dest: /etc/apt/sources.list.d/backports.list
owner: root
group: root
mode: 0644
force: yes
when: apply_backports is defined and apply_backports
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment