diff --git a/ansible.cfg b/ansible.cfg index de556bf..aece4b1 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,5 @@ [defaults] -inventory = yolo-test +inventory = hosts [inventory] localhost_warning = false diff --git a/facts/system.yml b/facts/system.yml index a6bfe6a..06e31da 100644 --- a/facts/system.yml +++ b/facts/system.yml @@ -7,6 +7,7 @@ lynis_install_dir: /usr/local/lynis lynis_report: /home/ling/lynis.log sudoers_install_dir: /etc/sudoers.d/ansible + ansible_pull_exec: /usr/bin/ansible-pull when: ansible_distribution == "Pop!_OS" @@ -17,6 +18,7 @@ lynis_install_dir: /usr/local/lynis lynis_report: /root/lynis.log sudoers_install_dir: /etc/sudoers.d/ansible + ansible_pull_exec: /usr/bin/ansible-pull when: ansible_distribution in ("Debian","Ubuntu") @@ -26,4 +28,5 @@ lynis_install_dir: /usr/local/lynis lynis_report: /root/lynis.log sudoers_install_dir: /usr/local/etc/sudoers.d/ansible + ansible_pull_exec: /usr/local/bin/ansible-pull when: ansible_distribution == "FreeBSD" \ No newline at end of file diff --git a/tasks/cron.yml b/tasks/cron.yml index 10a36ba..13f63af 100644 --- a/tasks/cron.yml +++ b/tasks/cron.yml @@ -3,6 +3,6 @@ user: ansible name: "Ansible Sync" minute: "*/5" - job: "/usr/bin/ansible-pull -o -U https://github.com/Hyperling/ansible.git > /dev/null" + job: "{{ ansible_pull_exec }} -o -U https://github.com/Hyperling/ansible.git > /dev/null" state: present disabled: no