diff --git a/tasks/main.yml b/tasks/main.yml index 3dab3c5..99dce8d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -41,7 +41,7 @@ - name: create ansible inventory ansible.builtin.copy: dest: "{{ potos_basics_ansible_inventory }}" - content: "{{ potos_basics_hostname }} ansible_connection=local" + content: "{{ potos_basics_hostname.stdout }} ansible_connection=local" force: false owner: root group: root diff --git a/templates/usr/local/bin/potos-ansible-pull.j2 b/templates/usr/local/bin/potos-ansible-pull.j2 index f27b321..3f86443 100644 --- a/templates/usr/local/bin/potos-ansible-pull.j2 +++ b/templates/usr/local/bin/potos-ansible-pull.j2 @@ -146,7 +146,7 @@ CheckToolAvailable /usr/bin/wall {{ potos_basics_ansible_workdir }} 2>&1 || die "Failed to checkout playbook repository" # Adjust ansible config with client -/usr/bin/sed 's|/var/log/potos|{{ potos_basics_ansible_logdir }}|' {{ potos_basics_ansible_workdir }}/ansible.cfg +/usr/bin/sed -i 's|/var/log/potos|{{ potos_basics_ansible_logdir }}|' {{ potos_basics_ansible_workdir }}/ansible.cfg # Run Ansible with custom ansible.cfg, use flock to prevent concurrent runs ANSIBLE_CONFIG={{ potos_basics_ansible_workdir }}/ansible.cfg @@ -163,6 +163,7 @@ exec {flockfd}