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
|
||||
---------------------
|
||||
<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
|
||||
multimedia_akku_warning: true
|
||||
|
||||
# you want to install missing packages?
|
||||
manage_packages_akku_warning: true
|
||||
|
||||
# version check for this playbook
|
||||
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
|
||||
when: submodules_versioncheck|bool
|
||||
|
||||
- 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
|
||||
- include_tasks: copy_media_files.yml
|
||||
|
||||
- name: install zenity and mpv for notifications
|
||||
become: yes
|
||||
|
@ -28,6 +11,17 @@
|
|||
- zenity
|
||||
- mpv
|
||||
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
|
||||
become: yes
|
||||
|
@ -38,14 +32,6 @@
|
|||
user: '{{ akku_user }}'
|
||||
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
|
||||
become: true
|
||||
when: install_and_enable_cronie|bool
|
||||
|
|
Loading…
Reference in a new issue