pulp_repo - Add or remove Pulp repos from a remote host.
New in version 2.3.
Synopsis
- Add or remove Pulp repos from a remote host.
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
add_export_distributor | no | Whether or not to add the export distributor to new rpm repositories. | ||
feed | no | Upstream feed URL to receive updates from. | ||
force_basic_auth | no | no |
| httplib2, the library used by the 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. |
importer_ssl_ca_cert | no | CA certificate string used to validate the feed source SSL certificate. This can be the file content or the path to the file. | ||
importer_ssl_client_cert | no | 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. | ||
importer_ssl_client_key | no | 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. | ||
name | yes | Name of the repo to add or remove. This correlates to repo-id in Pulp. | ||
proxy_host | no | Proxy url setting for the pulp repository importer. This is in the format scheme://host. | ||
proxy_port | no | Proxy port setting for the pulp repository importer. | ||
publish_distributor | no | Distributor to use when state is publish . The default is to publish all distributors. | ||
pulp_host | no | http://127.0.0.1 | URL of the pulp server to connect to. | |
relative_url | yes | Relative URL for the local repository. | ||
repo_type | no | rpm | Repo plugin type to use (i.e. rpm , docker ). | |
serve_http | no | Make the repo available over HTTP. | ||
serve_https | no | True | Make the repo available over HTTPS. | |
state | no | present |
| The repo state. A state of sync will queue a sync of the repo. This is asynchronous but not delayed like a scheduled sync. A state of publish will use the repository's distributor to publish the content. |
url_password | no | 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. | ||
url_username | no | The username for use in HTTP basic authentication to the pulp API. | ||
validate_certs | no | yes |
| If no , SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
wait_for_completion | no | no |
| Wait for asynchronous tasks to complete before returning. |
Examples
- name: Create a new repo with name 'my_repo' pulp_repo: name: my_repo relative_url: my/repo state: present - name: Create a repo with a feed and a relative URL 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: yes state: present - name: Remove a repo from the pulp server pulp_repo: name: my_old_repo repo_type: rpm state: absent
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
repo | Name of the repo that the action was performed on. | success | string | my_repo |
Notes
Note
- This module can currently only create distributors and importers on rpm repositories. Contributions to support other repo types are welcome.
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/pulp_repo_module.html