Skip to content

Commit

Permalink
Add task to install pip packages
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaffen committed Nov 7, 2023
1 parent 6ec8d85 commit d4af899
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tasks/install_pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# workaround for ansible semaphore
# usage for a playobook from the playbooks directory:
#
# - hosts: localhost
# name: "Dummy plug on localhost"
# gather_facts: false
# connection: local
# tasks:
# - name: "Install pip packages"
# ansible.builtin.import_tasks:
# file: "../tasks/install_pip.yml"

- name: "Make sure pip is installed"
ansible.builtin.command: "{{ ansible_python_interpreter }} -m ensurepip --upgrade"
register: pip_installed
changed_when: pip_installed.rc != 0

- name: "Make sure pip packages are installed"
ansible.builtin.pip:
name: "{{ item }}"
state: present
with_items:
- proxmoxer
- requests
- jmespath
- netaddr

0 comments on commit d4af899

Please sign in to comment.