community.general.pulp_repo module – Add or remove Pulp repos from a remote host
Note
This module is part of the community.general collection (version 5.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.pulp_repo
.
Synopsis
Add or remove Pulp repos from a remote host.
Note, this is for Pulp 2 only.
Parameters
Parameter |
Comments |
---|---|
Whether or not to add the export distributor to new Choices:
|
|
PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, |
|
PEM formatted file that contains your private key to be used for SSL client authentication. If |
|
Upstream feed URL to receive updates from. |
|
CA certificate string used to validate the feed source SSL certificate. This can be the file content or the path to the file. |
|
Certificate used as the client certificate when synchronizing the repository. This is used to communicate authentication information to the feed source. The value to this option must be the full path to the certificate. The specified file may be the certificate itself or a single file containing both the certificate and private key. This can be the file content or the path to the file. |
|
Private key to the certificate specified in importer_ssl_client_cert, assuming it is not included in the certificate file itself. This can be the file content or the path to the file. |
|
If Choices:
|
|
httplib2, the library used by the ansible.builtin.uri module only sends authentication information when a webservice responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. Choices:
|
|
Boolean flag to indicate whether sqlite files should be generated during a repository publish. Choices:
|
|
Header to identify as, generally appears in web server logs. Default: |
|
Name of the repo to add or remove. This correlates to repo-id in Pulp. |
|
Proxy url setting for the pulp repository importer. This is in the format scheme://host. |
|
Proxy password for the pulp repository importer. |
|
Proxy port setting for the pulp repository importer. |
|
Proxy username for the pulp repository importer. |
|
Distributor to use when state is |
|
URL of the pulp server to connect to. Default: |
|
Relative URL for the local repository. It’s required when state=present. |
|
Repo plugin type to use (i.e. Default: |
|
Whether to generate repoview files for a published repository. Setting this to Choices:
|
|
Make the repo available over HTTP. Choices:
|
|
Make the repo available over HTTPS. Choices:
|
|
The repo state. A state of Choices:
|
|
HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path |
|
The password for use in HTTP basic authentication to the pulp API. If the url_username parameter is not specified, the url_password parameter will not be used. |
|
The username for use in HTTP basic authentication to the pulp API. |
|
Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library gssapi to be installed. Credentials for GSSAPI can be specified with url_username/url_password or with the GSSAPI env var NTLM authentication is Choices:
|
|
If Choices:
|
|
If Choices:
|
|
Wait for asynchronous tasks to complete before returning. Choices:
|
Notes
Note
This module can currently only create distributors and importers on rpm repositories. Contributions to support other repo types are welcome.
Examples
- name: Create a new repo with name 'my_repo'
community.general.pulp_repo:
name: my_repo
relative_url: my/repo
state: present
- name: Create a repo with a feed and a relative URL
community.general.pulp_repo:
name: my_centos_updates
repo_type: rpm
feed: http://mirror.centos.org/centos/6/updates/x86_64/
relative_url: centos/6/updates
url_username: admin
url_password: admin
force_basic_auth: true
state: present
- name: Remove a repo from the pulp server
community.general.pulp_repo:
name: my_old_repo
repo_type: rpm
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Name of the repo that the action was performed on. Returned: success Sample: |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication