1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_base.git synced 2024-08-16 14:29:50 +02:00

Update role and add some actions

This commit is contained in:
L3D 2020-08-28 14:01:22 +02:00 committed by L3D
parent d556fe5778
commit a757e16981
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
28 changed files with 398 additions and 74 deletions

View file

@ -0,0 +1,16 @@
name: Ansible check alpine:latest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with alpine:latest
uses: roles-ansible/check-ansible-alpine-latest-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check archlinux:latest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with archlinux:latest
uses: roles-ansible/check-ansible-archlinux-latest-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check centos:centos6
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:centos6
uses: roles-ansible/check-ansible-centos-centos6-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check centos:centos7
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:centos7
uses: roles-ansible/check-ansible-centos-centos7-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check centos:centos8
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:centos8
uses: roles-ansible/check-ansible-centos-centos8-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check centos:latest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:latest
uses: roles-ansible/check-ansible-centos-latest-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check debian:buster
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:buster
uses: roles-ansible/check-ansible-debian-buster-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check debian:jessie
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:jessie
uses: roles-ansible/check-ansible-debian-jessie-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check debian:latest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:latest
uses: roles-ansible/check-ansible-debian-latest-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check debian:sid
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:sid
uses: roles-ansible/check-ansible-debian-sid-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check debian:stable
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:stable
uses: roles-ansible/check-ansible-debian-stable-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check debian:stretch
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:stretch
uses: roles-ansible/check-ansible-debian-stretch-action@master
with:
targets: "./"

16
.github/workflows/ansible-fedora-31.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Ansible check fedora:31
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:31
uses: roles-ansible/check-ansible-fedora-31-action@master
with:
targets: "./"

16
.github/workflows/ansible-fedora-32.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Ansible check fedora:32
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:32
uses: roles-ansible/check-ansible-fedora-32-action@master
with:
targets: "./"

16
.github/workflows/ansible-fedora-33.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Ansible check fedora:33
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:33
uses: roles-ansible/check-ansible-fedora-33-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check fedora:latest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:latest
uses: roles-ansible/check-ansible-fedora-latest-action@master
with:
targets: "./"

View file

@ -0,0 +1,20 @@
name: Ansible Lint check
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@master
with:
targets: "."
# [required]
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
args: ""
# [optional]

View file

@ -0,0 +1,16 @@
name: Ansible check ubuntu:bionic
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:bionic
uses: roles-ansible/check-ansible-ubuntu-bionic-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check ubuntu:eoan
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:eoan
uses: roles-ansible/check-ansible-ubuntu-eoan-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check ubuntu:latest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:latest
uses: roles-ansible/check-ansible-ubuntu-latest-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check ubuntu:trusty
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:trusty
uses: roles-ansible/check-ansible-ubuntu-trusty-action@master
with:
targets: "./"

View file

@ -0,0 +1,16 @@
name: Ansible check ubuntu:xenial
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:xenial
uses: roles-ansible/check-ansible-ubuntu-xenial-action@master
with:
targets: "./"

28
.travis.yml Normal file
View file

@ -0,0 +1,28 @@
---
# OS Details
os: linux
language: python
python: '3.8'
cache:
pip: true
# Install ansible and ansible-lint
install:
- pip install ansible
- pip install ansible-lint
# testing galaxy install and ansible lint
# more advanced testing is currently handled with
# github actions. The gh-actions for our test are there:
# https://github.com/roles-ansible and are tagged
# with 'github-actions' --> https://github.com/search?q=topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories
script:
- ansible-lint .
- echo -e "\n\n\n\n\nWe use github actions for more detailed tests.\n\nMore details about that in our github repo at:\nhttps://github.com/roles-ansible/role-ranger/actions\n\n\n\n\n\n"
notifications:
email:
on_success: never
on_failure: always
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View file

@ -10,6 +10,7 @@ If this is so, please create a pull request or at least creat an issue with what
This role was initial written for ``Debian 9`` and ``Fedora 29``.
In Spring 2019 it was only used on ``Debian 9``, ``Ubuntu 18.04 LTS`` and ``Ubuntu 19.4``. No ``RHEL`` based Systems anymore.
In Spring 2019 it was used on ``Debian 9``, ``Ubuntu 18.04 LTS``, ``Ubuntu 19.4`` and ``centos 7``.
In 2020 it expanded to more linux Systems such as ``Debian buster`` and ``Ubuntu 20.4 LTS``.
variables
-----------
@ -28,5 +29,3 @@ Packages are defined as variable in the ``vars`` Folder.
Open tasks
------------
- Some CI-Testing would be nice. Eg with docker and some common linux distributions.
- Meta File for Ansible Galaxy is missing
- Lint checks?

View file

@ -13,9 +13,12 @@ base__pkg_contrib: "{{ base_pkg_contrib }}"
# optionaly print some OS vars
base__print_os_vars: "{{ print_os_vars }}"
# choose latest or present for package state
# set this to latest for updating all packages!
base__package_state: 'present'
# should we update all packages?
base__upgrade_packages_to_latest_version: "{{ upgrade_packages_to_latest_version }}"
# LEGACY VARS
# ++ WILL BE REMOVED SOON ++
@ -24,7 +27,7 @@ add_ethz: true
# do we want the latest package version or just upgrade manually?
upgrade_packages_to_latest_version: true
upgrade_packages_to_latest_version: false
# we use vim!

View file

@ -13,67 +13,13 @@
- include_tasks: packages.yml
#- name: Install common base packages [Debian]
# become: yes
# apt:
# package: "{{ debian_packages }}"
# state: present
# update_cache: yes
# cache_valid_time: 43200
# when: ansible_os_family == 'Debian' and ansible_distribution_version != '7' and ansible_distribution_release != 'wheezy' and ansible_machine != 'armv6l'
#-# name: Install common base packages [Fedora]
# become: yes
# package:
# name: "{{ fedora_packages }}"
# state: present
# when: ansible_distribution == 'Fedora'
#
#- name: install packages for everyone except centos/rhel
# become: true
# package:
# name: "{{ packages_for_all_except_rhel }}"
# state: present
# when:
# - ansible_os_family != 'RedHat'
# - ansible_distribution_version != "14.04"
# - ansible_distribution_version != "12.04"
# - ansible_distribution_release != 'wheezy'
# - ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
#- name: Install extra packages
# become: true
# package:
# name: "{{ packages_extra }}"
# state: present
# when:
# - packages_extra is defined
# - packages_extra != '[]'
# - ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
#
#- name: Remove rpcbind, nfs-common
# become: yes
# package:
# name:
# - rpcbind
# - nfs-common
# state: absent
# when:
# - ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
# - ansible_os_family == 'Debian'
#
#- name: Upgrade all packages to latest
# become: true
# package:
# name: "*"
# state: latest
# when:
# - upgrade_packages_to_latest_version|bool
# - ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
- name: Upgrade all packages to latest
become: true
package:
name: "*"
state: "{{ base__package_state }}"
when:
- base__upgrade_packages_to_latest_version|bool
- include_tasks: editor.yml
when: editor_is_vim | bool

View file

@ -35,4 +35,3 @@
ansible_distribution == 'Fedora' and ansible_distribution_version | float >= 32 or
ansible_distribution == 'Debian' and ansible_distribution_version | float >= 8 or
ansible_os_family == 'Archlinux'

View file

@ -54,12 +54,5 @@ base__linux_packages:
- youtube-dl
- mpv
fedora_packages:
- mtr
- libselinux-python
- ranger
- python3-pip
- python3
playbook_version_number: 8998 # should be over ninethousand
playbook_version_number: 8999 # should be over ninethousand
playbook_version_path: 'base-packages_roles-ansible_github.version'