diff --git a/tasks/main.yml b/tasks/main.yml index 698fcd513c057598a8ec30470009e8eb1d18a419..c03792258ca76c42ebb9af57ee3b219edc908858 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,6 +4,7 @@ - name: Install Python raw: "PKG_PATH={{ openbsd_pkg_mirror }}/OpenBSD/$(uname -r)/packages/$(arch -s)/ /usr/sbin/pkg_add -I py-pip" register: openbsd_pkg_add_python + failed_when: "'error' in openbsd_pkg_add_python.stdout|lower" changed_when: "'py-pip' in openbsd_pkg_add_python.stdout" - name: Symlink python @@ -18,7 +19,7 @@ - name: Configure pkg lineinfile: dest: /etc/pkg.conf - line: 'installpath = {{ openbsd_pkg_mirror }}/OpenBSD/{{ ansible_distribution_release }}/packages/{{ ansible_architecture }}/' + line: 'installpath = {{ openbsd_pkg_mirror }}/OpenBSD/%v/packages/%a/' regexp: '^installpath =' state: present create: yes