Skip to content

Commit

Permalink
fix(os_agent_auto_update): Use full path to ansible-playbook in cron …
Browse files Browse the repository at this point in the history
…command

Fixes #50
  • Loading branch information
jhampson-dbre committed Sep 28, 2022
1 parent 9d219f8 commit fd67e83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions roles/os_agent_auto_update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ Role Variables
The following varaibles are defined in `defaults/main.yml`

```yaml
# The path that the automatic update playbook will be copied to for scheduling
os_agent_auto_update_playbook_dir: /home/homeassistant/playbooks
# The directory that the automatic update playbook will be copied to for scheduling
os_agent_auto_update_playbook_dir: /home/homeassistant/playbooks/

# The directory that the `ansible-playbook` command is in
# Default is for user pip install for root user
os_agent_ansible_playbook_cmd_dir: /root/.local/bin/

# Install ansible on the remote host so that the update playbook can run in cron. Set to false to you already have ansible installed, or need a specific Ansible version.
os_agent_auto_update_install_ansible: true
Expand Down Expand Up @@ -44,4 +48,4 @@ MIT
Author Information
------------------
@jhampson-dbre
@jhampson-dbre
3 changes: 2 additions & 1 deletion roles/os_agent_auto_update/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# defaults file for os_agent_auto_update
os_agent_auto_update_playbook_dir: /home/homeassistant/playbooks
os_agent_auto_update_playbook_dir: /home/homeassistant/playbooks/
os_agent_ansible_playbook_cmd_dir: /root/.local/bin/
os_agent_auto_update_install_ansible: true
2 changes: 1 addition & 1 deletion roles/os_agent_auto_update/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
name: "update OS Agent"
minute: "0"
hour: "5"
job: "ansible-playbook {{ os_agent_auto_update_playbook_dir }}/update_os_agent.yml"
job: "{{ os_agent_ansible_playbook_cmd_dir }}ansible-playbook {{ os_agent_auto_update_playbook_dir }}update_os_agent.yml"

0 comments on commit fd67e83

Please sign in to comment.