mirror of
https://github.com/roles-ansible/role_akku_warning.git
synced 2024-08-16 10:09:50 +02:00
Optimize role order
This commit is contained in:
parent
5f68a6f447
commit
d4cafafddf
4 changed files with 37 additions and 26 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
[![Build Status](https://travis-ci.org/chaos-bodensee/role_akku_warning.svg?branch=master)](https://travis-ci.org/chaos-bodensee/role_akku_warning)
|
||||||
|
[![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)
|
||||||
|
|
||||||
Akku Warning role
|
Akku Warning role
|
||||||
---------------------
|
---------------------
|
||||||
<a href="https://galaxy.ansible.com/do1jlr/akku_warning"><img width="80px" src="https://galaxy.ansible.com/assets/galaxy-logo-02.svg"/></a>
|
<a href="https://galaxy.ansible.com/do1jlr/akku_warning"><img width="80px" src="https://galaxy.ansible.com/assets/galaxy-logo-02.svg"/></a>
|
||||||
|
|
|
@ -12,5 +12,8 @@ install_and_enable_cronie: false
|
||||||
# play a video in the background with sound
|
# play a video in the background with sound
|
||||||
multimedia_akku_warning: true
|
multimedia_akku_warning: true
|
||||||
|
|
||||||
|
# you want to install missing packages?
|
||||||
|
manage_packages_akku_warning: true
|
||||||
|
|
||||||
# version check for this playbook
|
# version check for this playbook
|
||||||
submodules_versioncheck: true
|
submodules_versioncheck: true
|
||||||
|
|
19
tasks/copy_media_files.yml
Normal file
19
tasks/copy_media_files.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- name: copy sound warning script
|
||||||
|
become: yes
|
||||||
|
template:
|
||||||
|
src: 'templates/akku.sh'
|
||||||
|
dest: '/opt/akku.sh'
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: copy sound warning video
|
||||||
|
become: yes
|
||||||
|
copy:
|
||||||
|
src: "{{ akku_sound_src }}"
|
||||||
|
dest: "{{ akku_sound_dest }}"
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
when: multimedia_akku_warning|bool
|
|
@ -2,24 +2,7 @@
|
||||||
- include_tasks: versioncheck.yml
|
- include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: copy sound warning script
|
- include_tasks: copy_media_files.yml
|
||||||
become: yes
|
|
||||||
template:
|
|
||||||
src: 'templates/akku.sh'
|
|
||||||
dest: '/opt/akku.sh'
|
|
||||||
owner: 'root'
|
|
||||||
group: 'root'
|
|
||||||
mode: '0755'
|
|
||||||
|
|
||||||
- name: copy sound warning video
|
|
||||||
become: yes
|
|
||||||
copy:
|
|
||||||
src: "{{ akku_sound_src }}"
|
|
||||||
dest: "{{ akku_sound_dest }}"
|
|
||||||
owner: 'root'
|
|
||||||
group: 'root'
|
|
||||||
mode: '0644'
|
|
||||||
when: multimedia_akku_warning|bool
|
|
||||||
|
|
||||||
- name: install zenity and mpv for notifications
|
- name: install zenity and mpv for notifications
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -28,6 +11,17 @@
|
||||||
- zenity
|
- zenity
|
||||||
- mpv
|
- mpv
|
||||||
state: present
|
state: present
|
||||||
|
when: manage_packages_akku_warning | bool
|
||||||
|
|
||||||
|
- name: Make sure cron is installed
|
||||||
|
become: true
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- cronie
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- manage_packages_akku_warning | bool
|
||||||
|
- install_and_enable_cronie|bool
|
||||||
|
|
||||||
- name: Check akku every 2 minutes
|
- name: Check akku every 2 minutes
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -38,14 +32,6 @@
|
||||||
user: '{{ akku_user }}'
|
user: '{{ akku_user }}'
|
||||||
cron_file: /etc/crontab
|
cron_file: /etc/crontab
|
||||||
|
|
||||||
- name: Make sure cron is installed
|
|
||||||
become: true
|
|
||||||
when: install_and_enable_cronie|bool
|
|
||||||
package:
|
|
||||||
name:
|
|
||||||
- cronie
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Make sure cron is running
|
- name: Make sure cron is running
|
||||||
become: true
|
become: true
|
||||||
when: install_and_enable_cronie|bool
|
when: install_and_enable_cronie|bool
|
||||||
|
|
Loading…
Reference in a new issue