diff --git a/roles/geerlingguy.pip/.ansible-lint b/roles/geerlingguy.pip/.ansible-lint index 55572942..acc82551 100644 --- a/roles/geerlingguy.pip/.ansible-lint +++ b/roles/geerlingguy.pip/.ansible-lint @@ -1,2 +1,3 @@ skip_list: - - '106' + - 'yaml' + - 'role-name' diff --git a/roles/geerlingguy.pip/.github/stale.yml b/roles/geerlingguy.pip/.github/stale.yml index c7ff1275..3cc6ec31 100644 --- a/roles/geerlingguy.pip/.github/stale.yml +++ b/roles/geerlingguy.pip/.github/stale.yml @@ -12,6 +12,7 @@ onlyLabels: [] # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: + - bug - pinned - security - planned diff --git a/roles/geerlingguy.pip/.github/workflows/ci.yml b/roles/geerlingguy.pip/.github/workflows/ci.yml index a143723c..742244ae 100644 --- a/roles/geerlingguy.pip/.github/workflows/ci.yml +++ b/roles/geerlingguy.pip/.github/workflows/ci.yml @@ -29,12 +29,11 @@ jobs: python-version: '3.x' - name: Install test dependencies. - run: pip3 install yamllint ansible-lint + run: pip3 install yamllint - name: Lint code. run: | yamllint . - ansible-lint molecule: name: Molecule @@ -42,9 +41,8 @@ jobs: strategy: matrix: distro: - - centos8 - - centos7 - - fedora32 + - rockylinux8 + - fedora34 - ubuntu2004 - ubuntu1804 - debian10 diff --git a/roles/geerlingguy.pip/.github/workflows/release.yml b/roles/geerlingguy.pip/.github/workflows/release.yml index 408b7055..54af0110 100644 --- a/roles/geerlingguy.pip/.github/workflows/release.yml +++ b/roles/geerlingguy.pip/.github/workflows/release.yml @@ -32,7 +32,9 @@ jobs: python-version: '3.x' - name: Install Ansible. - run: pip3 install ansible-base + run: pip3 install ansible-core - name: Trigger a new import on Galaxy. - run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) + run: >- + ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} + $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) diff --git a/roles/geerlingguy.pip/.gitignore b/roles/geerlingguy.pip/.gitignore index f56f5b57..8840c8f0 100644 --- a/roles/geerlingguy.pip/.gitignore +++ b/roles/geerlingguy.pip/.gitignore @@ -1,3 +1,5 @@ *.retry */__pycache__ *.pyc +.cache + diff --git a/roles/geerlingguy.pip/README.md b/roles/geerlingguy.pip/README.md index f5d6a465..f60d2cc0 100644 --- a/roles/geerlingguy.pip/README.md +++ b/roles/geerlingguy.pip/README.md @@ -39,7 +39,7 @@ A list of packages to install with pip. Examples below: - name: docker state: absent - # Or update a package ot the latest version. + # Or update a package to the latest version. - name: docker state: latest @@ -51,6 +51,10 @@ A list of packages to install with pip. Examples below: - name: docker virtualenv: /my_app/venv + # Or pass through any extra arguments. + - name: my_special_package_from_my_special_repo + extra_args: --extra-index-url https://my-domain/pypi/pypi-master/simple + ## Dependencies None. diff --git a/roles/geerlingguy.pip/molecule/default/molecule.yml b/roles/geerlingguy.pip/molecule/default/molecule.yml index 74907107..d291e5b6 100644 --- a/roles/geerlingguy.pip/molecule/default/molecule.yml +++ b/roles/geerlingguy.pip/molecule/default/molecule.yml @@ -1,4 +1,5 @@ --- +role_name_check: 1 dependency: name: galaxy driver: @@ -8,7 +9,8 @@ platforms: image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host privileged: true pre_build_image: true provisioner: diff --git a/roles/geerlingguy.pip/tasks/main.yml b/roles/geerlingguy.pip/tasks/main.yml index dda7fac9..e2e8aa10 100644 --- a/roles/geerlingguy.pip/tasks/main.yml +++ b/roles/geerlingguy.pip/tasks/main.yml @@ -10,5 +10,6 @@ version: "{{ item.version | default(omit) }}" virtualenv: "{{ item.virtualenv | default(omit) }}" state: "{{ item.state | default(omit) }}" + extra_args: "{{ item.extra_args | default(omit) }}" executable: "{{ pip_executable }}" - with_items: "{{ pip_install_packages }}" + loop: "{{ pip_install_packages }}"