From 49bd8123a09f8985c6f46d6febffa09a05a917e1 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 19:09:29 +0200 Subject: [PATCH 1/9] Add more action checks for more operating systems --- .github/workflows/ansible-alpine-latest.yml | 16 ++++++++++++++++ .github/workflows/ansible-archlinux-latest.yml | 16 ++++++++++++++++ .github/workflows/ansible-centos-centos6.yml | 16 ++++++++++++++++ .github/workflows/ansible-centos-centos7.yml | 16 ++++++++++++++++ .github/workflows/ansible-centos-centos8.yml | 16 ++++++++++++++++ .github/workflows/ansible-centos-latest.yml | 16 ++++++++++++++++ .github/workflows/ansible-debian-latest.yml | 16 ++++++++++++++++ .github/workflows/ansible-fedora-31.yml | 16 ++++++++++++++++ .github/workflows/ansible-fedora-32.yml | 16 ++++++++++++++++ .github/workflows/ansible-fedora-33.yml | 16 ++++++++++++++++ .github/workflows/ansible-fedora-latest.yml | 16 ++++++++++++++++ .github/workflows/ansible-ubuntu-bionic.yml | 16 ++++++++++++++++ .github/workflows/ansible-ubuntu-eoan.yml | 16 ++++++++++++++++ .github/workflows/ansible-ubuntu-trusty.yml | 16 ++++++++++++++++ .github/workflows/ansible-ubuntu-xenial.yml | 16 ++++++++++++++++ 15 files changed, 240 insertions(+) create mode 100644 .github/workflows/ansible-alpine-latest.yml create mode 100644 .github/workflows/ansible-archlinux-latest.yml create mode 100644 .github/workflows/ansible-centos-centos6.yml create mode 100644 .github/workflows/ansible-centos-centos7.yml create mode 100644 .github/workflows/ansible-centos-centos8.yml create mode 100644 .github/workflows/ansible-centos-latest.yml create mode 100644 .github/workflows/ansible-debian-latest.yml create mode 100644 .github/workflows/ansible-fedora-31.yml create mode 100644 .github/workflows/ansible-fedora-32.yml create mode 100644 .github/workflows/ansible-fedora-33.yml create mode 100644 .github/workflows/ansible-fedora-latest.yml create mode 100644 .github/workflows/ansible-ubuntu-bionic.yml create mode 100644 .github/workflows/ansible-ubuntu-eoan.yml create mode 100644 .github/workflows/ansible-ubuntu-trusty.yml create mode 100644 .github/workflows/ansible-ubuntu-xenial.yml diff --git a/.github/workflows/ansible-alpine-latest.yml b/.github/workflows/ansible-alpine-latest.yml new file mode 100644 index 0000000..8b9d618 --- /dev/null +++ b/.github/workflows/ansible-alpine-latest.yml @@ -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: "./" diff --git a/.github/workflows/ansible-archlinux-latest.yml b/.github/workflows/ansible-archlinux-latest.yml new file mode 100644 index 0000000..9d651a3 --- /dev/null +++ b/.github/workflows/ansible-archlinux-latest.yml @@ -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: "./" diff --git a/.github/workflows/ansible-centos-centos6.yml b/.github/workflows/ansible-centos-centos6.yml new file mode 100644 index 0000000..6907237 --- /dev/null +++ b/.github/workflows/ansible-centos-centos6.yml @@ -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: "./" diff --git a/.github/workflows/ansible-centos-centos7.yml b/.github/workflows/ansible-centos-centos7.yml new file mode 100644 index 0000000..90bff41 --- /dev/null +++ b/.github/workflows/ansible-centos-centos7.yml @@ -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: "./" diff --git a/.github/workflows/ansible-centos-centos8.yml b/.github/workflows/ansible-centos-centos8.yml new file mode 100644 index 0000000..5d7acc9 --- /dev/null +++ b/.github/workflows/ansible-centos-centos8.yml @@ -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: "./" diff --git a/.github/workflows/ansible-centos-latest.yml b/.github/workflows/ansible-centos-latest.yml new file mode 100644 index 0000000..de991de --- /dev/null +++ b/.github/workflows/ansible-centos-latest.yml @@ -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: "./" diff --git a/.github/workflows/ansible-debian-latest.yml b/.github/workflows/ansible-debian-latest.yml new file mode 100644 index 0000000..d0ad4ca --- /dev/null +++ b/.github/workflows/ansible-debian-latest.yml @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-31.yml b/.github/workflows/ansible-fedora-31.yml new file mode 100644 index 0000000..6bbe44d --- /dev/null +++ b/.github/workflows/ansible-fedora-31.yml @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-32.yml b/.github/workflows/ansible-fedora-32.yml new file mode 100644 index 0000000..70fc147 --- /dev/null +++ b/.github/workflows/ansible-fedora-32.yml @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-33.yml b/.github/workflows/ansible-fedora-33.yml new file mode 100644 index 0000000..6032811 --- /dev/null +++ b/.github/workflows/ansible-fedora-33.yml @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-latest.yml b/.github/workflows/ansible-fedora-latest.yml new file mode 100644 index 0000000..8b14097 --- /dev/null +++ b/.github/workflows/ansible-fedora-latest.yml @@ -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: "./" \ No newline at end of file diff --git a/.github/workflows/ansible-ubuntu-bionic.yml b/.github/workflows/ansible-ubuntu-bionic.yml new file mode 100644 index 0000000..aea24a2 --- /dev/null +++ b/.github/workflows/ansible-ubuntu-bionic.yml @@ -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: "./" diff --git a/.github/workflows/ansible-ubuntu-eoan.yml b/.github/workflows/ansible-ubuntu-eoan.yml new file mode 100644 index 0000000..30b5779 --- /dev/null +++ b/.github/workflows/ansible-ubuntu-eoan.yml @@ -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: "./" diff --git a/.github/workflows/ansible-ubuntu-trusty.yml b/.github/workflows/ansible-ubuntu-trusty.yml new file mode 100644 index 0000000..a18c397 --- /dev/null +++ b/.github/workflows/ansible-ubuntu-trusty.yml @@ -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: "./" diff --git a/.github/workflows/ansible-ubuntu-xenial.yml b/.github/workflows/ansible-ubuntu-xenial.yml new file mode 100644 index 0000000..3bf993d --- /dev/null +++ b/.github/workflows/ansible-ubuntu-xenial.yml @@ -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: "./" From 95f35dbafeec09d82ddf2d7b123f794f952ffd9d Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 19:15:51 +0200 Subject: [PATCH 2/9] alpine linux not working --- .github/workflows/ansible-alpine-latest.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/workflows/ansible-alpine-latest.yml diff --git a/.github/workflows/ansible-alpine-latest.yml b/.github/workflows/ansible-alpine-latest.yml deleted file mode 100644 index 8b9d618..0000000 --- a/.github/workflows/ansible-alpine-latest.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" From 03a1cb1109d627522c642b1230316d0af23ac831 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 19:16:27 +0200 Subject: [PATCH 3/9] No support for centos --- .github/workflows/ansible-centos-centos6.yml | 16 ---------------- .github/workflows/ansible-centos-centos7.yml | 16 ---------------- .github/workflows/ansible-centos-centos8.yml | 16 ---------------- .github/workflows/ansible-centos-latest.yml | 16 ---------------- 4 files changed, 64 deletions(-) delete mode 100644 .github/workflows/ansible-centos-centos6.yml delete mode 100644 .github/workflows/ansible-centos-centos7.yml delete mode 100644 .github/workflows/ansible-centos-centos8.yml delete mode 100644 .github/workflows/ansible-centos-latest.yml diff --git a/.github/workflows/ansible-centos-centos6.yml b/.github/workflows/ansible-centos-centos6.yml deleted file mode 100644 index 6907237..0000000 --- a/.github/workflows/ansible-centos-centos6.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" diff --git a/.github/workflows/ansible-centos-centos7.yml b/.github/workflows/ansible-centos-centos7.yml deleted file mode 100644 index 90bff41..0000000 --- a/.github/workflows/ansible-centos-centos7.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" diff --git a/.github/workflows/ansible-centos-centos8.yml b/.github/workflows/ansible-centos-centos8.yml deleted file mode 100644 index 5d7acc9..0000000 --- a/.github/workflows/ansible-centos-centos8.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" diff --git a/.github/workflows/ansible-centos-latest.yml b/.github/workflows/ansible-centos-latest.yml deleted file mode 100644 index de991de..0000000 --- a/.github/workflows/ansible-centos-latest.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" From 72af28dd802f88e2fa85b5e8911cca3c75bac637 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 19:18:05 +0200 Subject: [PATCH 4/9] No support for fedora because mpv is not available by default --- .github/workflows/ansible-fedora-31.yml | 16 ---------------- .github/workflows/ansible-fedora-32.yml | 16 ---------------- .github/workflows/ansible-fedora-33.yml | 16 ---------------- .github/workflows/ansible-fedora-latest.yml | 16 ---------------- meta/main.yml | 3 --- 5 files changed, 67 deletions(-) delete mode 100644 .github/workflows/ansible-fedora-31.yml delete mode 100644 .github/workflows/ansible-fedora-32.yml delete mode 100644 .github/workflows/ansible-fedora-33.yml delete mode 100644 .github/workflows/ansible-fedora-latest.yml diff --git a/.github/workflows/ansible-fedora-31.yml b/.github/workflows/ansible-fedora-31.yml deleted file mode 100644 index 6bbe44d..0000000 --- a/.github/workflows/ansible-fedora-31.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-32.yml b/.github/workflows/ansible-fedora-32.yml deleted file mode 100644 index 70fc147..0000000 --- a/.github/workflows/ansible-fedora-32.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-33.yml b/.github/workflows/ansible-fedora-33.yml deleted file mode 100644 index 6032811..0000000 --- a/.github/workflows/ansible-fedora-33.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-latest.yml b/.github/workflows/ansible-fedora-latest.yml deleted file mode 100644 index 8b14097..0000000 --- a/.github/workflows/ansible-fedora-latest.yml +++ /dev/null @@ -1,16 +0,0 @@ -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: "./" \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml index a8777fe..6511090 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,9 +15,6 @@ galaxy_info: - name: Ubuntu versions: - all - - name: Fedora - versions: - - all galaxy_tags: - akku - warning From f92391b3d6d362064e34da07b551b5517438e3e0 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 19:36:07 +0200 Subject: [PATCH 5/9] rename akku.sh to akku.sh.j2 and fix description --- tasks/copy_media_files.yml | 2 +- tasks/main.yml | 2 +- templates/{akku.sh => akku.sh.j2} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename templates/{akku.sh => akku.sh.j2} (100%) diff --git a/tasks/copy_media_files.yml b/tasks/copy_media_files.yml index 077aa96..a460163 100644 --- a/tasks/copy_media_files.yml +++ b/tasks/copy_media_files.yml @@ -2,7 +2,7 @@ - name: copy sound warning script become: yes template: - src: 'templates/akku.sh' + src: 'templates/akku.sh.j2' dest: '/opt/akku.sh' owner: 'root' group: 'root' diff --git a/tasks/main.yml b/tasks/main.yml index f1aeaed..b37a1b5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,7 +23,7 @@ - manage_packages_akku_warning | bool - install_and_enable_cronie | bool -- name: Check akku every 2 minutes +- name: Check akku every 3 minutes become: yes cron: name: check if akku still okay diff --git a/templates/akku.sh b/templates/akku.sh.j2 similarity index 100% rename from templates/akku.sh rename to templates/akku.sh.j2 From e9b298483b87ca1eb4f429e0d5507fbd5068d6e4 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 20:39:04 +0200 Subject: [PATCH 6/9] Update README description and testing --- README.md | 103 ++++++++++++++++++++++++++++------------------ defaults/main.yml | 7 ++-- 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 6941c94..fe02bb0 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,16 @@ -[![ansible-galaxy: do1jlr.akku_warning](https://raw.githubusercontent.com/chaos-bodensee/role_akku_warning/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/akku_warning) -[![Ansible Lint check](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20Lint%20check/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+Lint+check%22) -[![Build Status](https://travis-ci.org/chaos-bodensee/role_akku_warning.svg?branch=master)](https://travis-ci.org/chaos-bodensee/role_akku_warning) -[![Ansible check debian:stable](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20check%20debian:stable/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Astable%22) -[![Ansible check debian:sid](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20check%20debian:sid/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Asid%22) -[![Ansible check debian:buster](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20check%20debian:buster/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Abuster%22) -[![Ansible check debian:jessie](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20check%20debian:jessie/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Ajessie%22) -[![Ansible check debian:stretch](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20check%20debian:stretch/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Astretch%22) -[![Ansible check ubuntu:latest](https://github.com/chaos-bodensee/role_akku_warning/workflows/Ansible%20check%20ubuntu:latest/badge.svg)](https://github.com/chaos-bodensee/role_akku_warning/actions?query=workflow%3A%22Ansible+check+ubuntu%3Alatest%22) -[![MIT License](https://raw.githubusercontent.com/chaos-bodensee/role_akku_warning/master/.github/license.svg?sanitize=true)](https://github.com/chaos-bodensee/role_akku_warning/blob/master/LICENSE) +[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/role_akku_warning/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/akku_warning) [![Build Status](https://travis-ci.org/roles-ansible/role_akku_warning.svg?branch=master)](https://travis-ci.org/roles-ansible/role_akku_warning) [![MIT License](https://raw.githubusercontent.com/roles-ansible/role_akku_warning/master/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/role_akku_warning/blob/master/LICENSE) - ansible role: akku warning +ansible role: akku warning ========================== -This ansible warning will install an bash Script, that will be executet every 3 minutes. +This ansible role installs a bash script (per cronjob) which is executed every 3 minutes. This bash script checks if the battery level is below 25 percent and is currently not charging. If this is the case, the program [zenity](https://de.wikipedia.org/wiki/Zenity) installed by this role will generate a popup message stating that the battery is low. +While the battery level is between 15 and 10 percent, it will also attempt to play a sound. But this does not (yet) work reliably. -If your batterie is under 25 percent, it will start warning you. - -This role is tested with the [i3 - improved tiling wm](https://i3wm.org/), but probably will work on all window magers! - - Variables: ------------ -```yaml -# Your username you mostly use on your device -akku_user: "{{ ansible_user_id }}" - -# should we install and enable cronie? -install_and_enable_cronie: true - -# play a sound at critical battery level -multimedia_akku_warning: true - -# set this to false to disable package installation? -manage_packages_akku_warning: true - -# version check for this playbook -submodules_versioncheck: true - -``` -*For a complete view of all variables pleas have a look into the default folder.* +This role is tested with the [i3 - improved tiling wm](https://i3wm.org/), installed by [this role](https://github.com/chaos-bodensee/role-i3wm.git) at Archlinux, but probably will work on all window magers and the most operating systems! Installation and Usage ------------- +------------------------ + ### install with galaxy: ```bash ansible-galaxy install do1jlr.akku_warning @@ -57,7 +27,7 @@ ansible-galaxy install do1jlr.akku_warning ### installation via git ```bash # download this role into your roles directory -git clone https://github.com/chaos-bodensee/role_akku_warning.git +git clone https://github.com/roles-ansible/role_akku_warning.git ``` ### example playbook @@ -71,10 +41,61 @@ git clone https://github.com/chaos-bodensee/role_akku_warning.git - role_akku_warning ``` + Variables: +----------- +```yaml +--- +# simple version check for this playbook +# true is highly recomended +submodules_versioncheck: false + +# which user are we currently using? +akku_user: "{{ ansible_user_id }}" + +# which sound should we play? +akku_sound_src: 'files/low_battery.m4a' +akku_sound_dest: '/opt/low_battery.m4a' + +# should we install cronie? +install_and_enable_cronie: true + +# play a video in the background with sound +multimedia_akku_warning: true + +# you want to install missing packages? +manage_packages_akku_warning: true +``` + + Missing something? ---------------- -Please feel free to open a [github](https://github.com/chaos-bodensee/role_akku_warning.git) Issue or Pull-Request. Thanks <3 +Please feel free to open a [github](https://github.com/roles-ansible/role_akku_warning.git) Issue or Pull-Request. Thanks <3 Testing ---------- -This role is tested via github [actions](https://github.com/chaos-bodensee/role_akku_warning/actions). +---------- +This role is tested with [these github-action](https://github.com/search?q=topic%3Acheck-ansible+topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories) tests for different versions of differen linux systems. Linting is tested via travis-ci and the [ansible-lint action](https://github.com/marketplace/actions/ansible-lint). +If you want to find out more about our tests, please have a look at the github marketplace. + +| test status | Github Marketplace | +| :--------- | :---------------- | +| [![Travis Build Status](https://travis-ci.org/roles-ansible/role_akku_warning.svg?branch=master)](https://travis-ci.org/roles-ansible/role_akku_warning) | [.travis.yml](https://github.com/roles-ansible/role_akku_warning/blob/master/.travis.yml) | +||| +| [![Ansible Lint check](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20Lint%20check/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+Lint+check%22) | [ansible-lint action](https://github.com/marketplace/actions/ansible-lint) +| [![Ansible check debian:stable](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20debian:stable/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Astable%22) | [ansible test with debian stable](https://github.com/marketplace/actions/check-ansible-debian-stable) | +| [![Ansible check debian:latest](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20debian:latest/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Alatest%22) | [ansible test with debian latest](https://github.com/marketplace/actions/check-ansible-debian-latest) | +| [![Ansible check debian:sid](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20debian:sid/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Asid%22) | [ansible test with debian sid](https://github.com/marketplace/actions/check-ansible-debian-sid) | +| [![Ansible check debian:buster](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20debian:buster/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Abuster%22) | [ansible test with debian buster](https://github.com/marketplace/actions/check-ansible-debian-buster) | +| [![Ansible check debian:jessie](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20debian:jessie/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Ajessie%22) | [ansible test with debian jessie](https://github.com/marketplace/actions/check-ansible-debian-jessie) | +| [![Ansible check debian:stretch](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20debian:stretch/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+debian%3Astretch%22) | [ansible test with debian stretch](https://github.com/marketplace/actions/check-ansible-debian-stretch) | +| | | +| [![Ansible check archlinux:latest](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20archlinux:latest/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+archlinux%3Alatest%22) | [ansible test with archlinux latest](https://github.com/marketplace/actions/check-ansible-archlinux-latest) | +| | | +| [![Ansible check ubuntu:latest](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20ubuntu:latest/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+ubuntu%3Alatest%22) | [ansible test with ubuntu latest](https://github.com/marketplace/actions/check-ansible-ubuntu-latest) | +| [![Ansible check ubuntu:bionic](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20ubuntu:bionic/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+ubuntu%3Abionic%22) | [ansible test with ubuntu bionic](https://github.com/marketplace/actions/check-ansible-ubuntu-bionic) | +| [![Ansible check ubuntu:eoan](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20ubuntu:eoan/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+ubuntu%3Aeoan%22) | [ansible test with ubuntu eoan](https://github.com/marketplace/actions/check-ansible-ubuntu-eoan) | +| [![Ansible check ubuntu:trusty](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20ubuntu:trusty/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+ubuntu%3Atrusty%22) | [ansible test with ubuntu trusty](https://github.com/marketplace/actions/check-ansible-ubuntu-trusty) | +| [![Ansible check ubuntu:xenial](https://github.com/roles-ansible/role_akku_warning/workflows/Ansible%20check%20ubuntu:xenial/badge.svg)](https://github.com/roles-ansible/role_akku_warning/actions?query=workflow%3A%22Ansible+check+ubuntu%3Axenial%22) | [ansible test with ubuntu xenial](https://github.com/marketplace/actions/check-ansible-ubuntu-xenial) | + + Contribution +------------ +If you are missing some features or have an idea for improving this role, please feel free to open an issue - or even better - create a pull request. diff --git a/defaults/main.yml b/defaults/main.yml index 5c05424..c571c49 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,8 @@ --- +# simple version check for this playbook +# true is highly recomended +submodules_versioncheck: false + # which user are we currently using? akku_user: "{{ ansible_user_id }}" @@ -14,6 +18,3 @@ multimedia_akku_warning: true # you want to install missing packages? manage_packages_akku_warning: true - -# version check for this playbook -submodules_versioncheck: true From 7a19834b789025cca44869167034db6b8eabb457 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 20:40:50 +0200 Subject: [PATCH 7/9] update metadata --- meta/main.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 6511090..33a7e9f 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -11,10 +11,16 @@ galaxy_info: versions: all - name: Debian versions: - - all + - sid + - buster + - jessie + - stretch - name: Ubuntu versions: - - all + - xenial + - trusty + - eoan + - bionic galaxy_tags: - akku - warning From 7cb1c74ebc0bb1113ed18cdf217880b35e80a3e0 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 21:10:33 +0200 Subject: [PATCH 8/9] Add ad-hoc command --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index fe02bb0..8e14d9e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,12 @@ This role is tested with the [i3 - improved tiling wm](https://i3wm.org/), insta ansible-galaxy install do1jlr.akku_warning ``` +You can execute the role **directly via ansible ad-hoc commands**, but it is highly recomended to create a ansible playbook +```bash +# example ad-hoc command +ansible -m include_role -a "name=do1jlr.akku_warning" localhost +``` + ### example playbook with galaxy ```yaml --- From dfc6422ee34e68924311846991de149d187e7038 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 16 May 2020 21:19:08 +0200 Subject: [PATCH 9/9] cleanup FOUNDING page --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 74f2231..51ba466 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -2,4 +2,3 @@ github: [do1jlr] liberapay: L3D -custom: ['https://paypal.me/c3woc']