Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ skip_list:
- galaxy[version-incorrect]
- meta-runtime[unsupported-version]
- fqcn[action-core]

# Ensure dependent collections are not linted
exclude_paths:
- .ansible/
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
fail-fast: false
matrix:
pulp:
- "3.21"
- "3.45"
- "3.81"
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
- uses: actions/checkout@v3
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible==5.* jmespath pulp-glue==0.21.*
pip install ansible==11.* jmespath pulp-glue==0.33.* pulp-glue-deb==0.3.*
ansible-galaxy collection install git+file://$(pwd)

- name: Run Pulp in one
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ Note: Pulp server installation is out of this collection's scope - for this purp

## Tested with Ansible

Tested with the current Ansible 2.9-2.10 releases.
Tested with the current Ansible 11 release.

## Included content

pulp_contentguard role
pulp_container_content role
pulp_content_guard role
pulp_distribution role
pulp_django_user role
pulp_group role
pulp_publication role
pulp_repository role
pulp_user role

## Using this collection

Expand Down
5 changes: 3 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ namespace: stackhpc
name: pulp
description: >
Roles and plugins Pulp repository server configuration
version: "0.5.5"
version: "0.6.0"
readme: "README.md"
authors:
- "Piotr Parczewski"
- "Michał Nasiadka"
- "Mark Goddard"
- "Alex Welsh"
dependencies:
"pulp.squeezer": "*"
"pulp.squeezer": "0.2.3"
license:
- "Apache-2.0"
tags:
Expand Down
223 changes: 0 additions & 223 deletions plugins/modules/pulp_container_content.py

This file was deleted.

1 change: 1 addition & 0 deletions roles/pulp_container_content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Role variables
when `state` is `present`.
* `repository`: Name of the repository to copy to when `state is `present`
or the repository to remove from when `state` is `absent`.
* `is_push`: Whether destination repo is a push repository. Default is `false`.
* `src_repo`: Name of the repository to copy from when `state` is `present`.
* `src_is_push`: Whether `src_repo` is a push repository. Default is `false`.
* `state`: Whether to add (`present`) or remove (`absent`) content.
Expand Down
37 changes: 11 additions & 26 deletions roles/pulp_container_content/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
---
- name: Initialise active tasks list
set_fact:
pulp_container_active_tasks: []

- name: Add or remove content units
stackhpc.pulp.pulp_container_content:
pulp_url: "{{ pulp_url }}"
username: "{{ pulp_username }}"
password: "{{ pulp_password }}"
validate_certs: "{{ pulp_validate_certs | bool }}"
allow_missing: "{{ item.allow_missing | default(omit) }}"
is_push: "{{ item.is_push | default(omit) }}"
src_repo: "{{ item.src_repo | default(omit) }}"
src_is_push: "{{ item.src_is_push | default(omit) }}"
repository: "{{ item.repository }}"
tags: "{{ item.tags }}"
state: "{{ item.state | default(omit) }}"
wait: "{{ pulp_container_content_wait | bool }}"
include_tasks: process_content.yml
loop: "{{ pulp_container_content }}"
register: pulp_container_content_result
loop_control:
loop_var: content_item

- name: Wait for tasks to complete
pulp.squeezer.task:
pulp_url: "{{ pulp_url }}"
username: "{{ pulp_username }}"
password: "{{ pulp_password }}"
validate_certs: "{{ pulp_validate_certs | bool }}"
pulp_href: "{{ content_result.task.pulp_href }}"
state: "completed"
loop: "{{ pulp_container_content }}"
when:
- not pulp_container_content_wait | bool
- "'task' in content_result"
changed_when: pulp_container_content_wait_result.task.created_resources | default([]) | length > 0
register: pulp_container_content_wait_result
loop_control:
index_var: result_index
vars:
content_result: "{{ pulp_container_content_result.results[result_index] }}"
pulp_href: "{{ item }}"
state: completed
loop: "{{ pulp_container_active_tasks }}"
when: pulp_container_content_wait | bool
Loading
Loading