diff --git a/defaults/main.yml b/defaults/main.yml index e45ae11..5e40f07 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,6 @@ --- +# which user are we currently using? +akku_user: "{{ ansible_user_id }}" # should we install cronie? install_and_enable_cronie: false diff --git a/tasks/main.yml b/tasks/main.yml index edec8cf..585db5d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,4 @@ --- - - name: copy sound warning script become: yes copy: @@ -33,7 +32,7 @@ name: check if akku still okay job: /opt/akku.sh minute: '*/3' - user: '{{ user }}' + user: '{{ akku_user }}' cron_file: /etc/crontab - name: Make sure cron is installed @@ -52,4 +51,3 @@ state: started enabled: yes daemon_reload: yes -