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

Merge branch 'development' into 'master'

initial

See merge request ansible/roles/essential!1
parents 8365d0c6 a47d1c1f
No related branches found
No related tags found
No related merge requests found
/.idea
# VARIABLES
variables:
DOCKER_BUILDKIT: 1
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
DOCKER_TLS_CERTDIR: ""
##########################################################################################################
## PIPELINE DEFINITION
stages:
- check
##########################################################################################################
### COMMON SECTION
.common: &common
services:
- registry.cyberbrain.pw/docker/dind
variables:
GIT_DEPTH: 1
ANSIBLE_FORCE_COLOR: "True"
before_script:
- chmod -R o-w ../
##########################################################################################################
### TEST SECTION
test:
<<: *common
stage: check
image: registry.cyberbrain.pw/ansible/ansible
except:
- /^master$/
script:
- find . -type d -exec ansible-lint --force-color -v -x '204' {} \;
galaxy_info:
author: Dmitriy Safronov <zimniy@cyberbrain.pw>
description: Essential configuration
# company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
issue_tracker_url: https://gitlab.cyberbrain.pw/ansible/roles/essential/-/issues
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: LGPL-2.0-or-later
min_ansible_version: 2.9
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
platforms:
- name: Ubuntu
versions:
- focal
- bionic
- name: Linux Mint
versions:
- ulyana
- tricia
- name: Debian
versions:
- buster
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
---
# 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
########################################################################################################################
# TMUX
- name: Enable tmux on login for non-system users and root
copy:
content: |
if [[ $- == *i* ]] && [[ ${UID} -eq 0 || ${UID} -ge 1000 ]]; then
if [[ -n "$(which tmux)" ]]; then
if [[ -z "${TMUX}" ]]; then
tmux has-session -t login || exec tmux new-session -s login && exec tmux attach-session -d -t login
fi
fi
fi
dest: /etc/profile.d/tmux.sh
owner: root
group: root
mode: 0644
---
# APT
- name: Install aptitude & debconf-utils using apt
apt:
state: present
update_cache: yes
force_apt_get: yes
install_recommends: no
pkg:
- aptitude
- debconf-utils
# ESSENTIAL PACKAGES
- name: Install packages
apt:
state: present
update_cache: yes
install_recommends: no
pkg:
- bash
- mawk
- sed
- grep
- rsync
- tmux
---
# REPOSITORIES
- name: Setup repositories
include_tasks: repositories.yml
# ESSENTIAL SETUP
- name: Perform essential setup
include_tasks: essential.yml
---
# Mint
- 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 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 Buster
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
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 Buster
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
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 Buster
copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian buster-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 Buster
copy:
content: |
deb [arch=amd64] http://deb.debian.org/debian buster-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 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