{"id":13501534,"url":"https://github.com/pulp/squeezer","last_synced_at":"2025-03-29T09:30:55.257Z","repository":{"id":38672952,"uuid":"189855081","full_name":"pulp/squeezer","owner":"pulp","description":"Ansible modules to control a pulp3 server","archived":false,"fork":false,"pushed_at":"2025-03-07T12:25:05.000Z","size":5944,"stargazers_count":25,"open_issues_count":9,"forks_count":34,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-07T13:30:05.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-02T14:15:51.000Z","updated_at":"2025-03-07T12:25:09.000Z","dependencies_parsed_at":"2023-01-25T13:45:56.027Z","dependency_job_id":"e0612c55-48c7-413b-86df-b29960f47651","html_url":"https://github.com/pulp/squeezer","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fsqueezer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fsqueezer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fsqueezer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fsqueezer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulp","download_url":"https://codeload.github.com/pulp/squeezer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246167023,"owners_count":20734377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:01:40.834Z","updated_at":"2025-03-29T09:30:51.667Z","avatar_url":"https://github.com/pulp.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![Build Status](https://github.com/pulp/squeezer/workflows/CI/badge.svg)\n\n# Squeezer, an Ansible collection of modules for Pulp\n\nThis collection provides a set of ansible modules to control a [pulp](https://pulpproject.org) server (version 3) in a descriptive way.\nThis is neither to be confused with [pulp\\_installer](https://github.com/pulp/pulp_installer) to install pulp,\nnor [pulp\\_ansible](https://github.com/pulp/pulp_ansible) to manage ansible content in pulp.\n\nA lot of inspiration has been drawn from [foreman-ansible-modules](https://github.com/theforeman/foreman-ansible-modules).\n\n## Installation\n\n### Install from Ansible Galaxy\n\nThe collection is available from Ansible Galaxy, so you can install it via\n\n    $ ansible-galaxy collection install pulp.squeezer\n\n### Build locally\n\nAlternatively you can building the collection artifact with\n\n    $ make dist\n\nand install the resulting `tar.gz` file with\n\n    $ ansible-galaxy collection install pulp-squeezer-\u003cversion\u003e.tar.gz\n\n## Documentation\n\nYou can find the inline documentation of each module with `ansible-doc pulp.squeezer.\u003cmodule_name\u003e`.\n\n## Testing\n\nTesting is done by running handcrafted playbooks from `tests/playbooks` while playing back prerecorded server answers.\nUsing python virtual environments is recommended.\n\nThere is usually one playbook per module that it is meant to test, but that is not a hard requirement.\n\nThe playbooks are usually organized in three consecutive plays:\n\n * The first play is meant to setup the environment.\n   Fixtures like dependent pulp resources can be prepared here.\n   It runs against `localhost` to prevent recording any vcr tapes.\n * The second play contains the actual tests.\n   This usually involves calling the module in question several times with varying parameters and verifying its output.\n   Resources created in the first play can be referred to here.\n   It is executed on the virtual host `tests` to allow for requests to the REST API and their corresponding responses to be recorded.\n * The third and last play is dedicated to cleanup.\n   Any resources created (and maybe left over) in the previous two plays should be removed again here.\n   Again with the target `localhost`, this part is not recorded.\n\nDuring playback, only the prerecorded play in the middle is executed.\nPlease make sure, that it can run independently from the others.\nAlso it should not depend on any of the variables defined in `tests/playbooks/vars/server.yaml` other than the connection credentials.\n\nTo run the tests, you can either call `make test`, or `make test_\u003cplaybook_name\u003e` to only run a specific one.\nTo perform codestyle linting and ansible sanity checks, run `make lint sanity`.\n\nTo (re-)record tests or run live tests, you need a running pulp instance.\nTwo common ways to provide that development server are explained below.\n\n!!! Warning\n    Do not use a production instance, as the tests might perform destructive actions.\n\n### Recording tests against a Pulplift Vagrant environment\n\nA full vm installation of pulp can easily be achieved by using [pulplift](https://github.com/pulp/pulp_installer/blob/master/docs/pulplift.md).\nIt is recommended to use one of the sandbox installations.\nWhen the vm is up, you need to configure its connection details in `tests/playbooks/vars/server.yaml`.\nFor example, to run all tests live against this vm:\n\n+```\nmake livetest\n+```\n\nThe fixtures for the `file_remote` test can be recorded with:\n\n+```\nmake record_file_remote\n+```\n\n### Running tests against a Pulp in one container\n\nThe `tests/run_container.sh` script is provided and allows you to run a command with a [Pulp in one](https://pulpproject.org/pulp-in-one-container/) container active.\nIt requires Docker or Podman to be installed.\nThe default credentials in `tests/playbooks/vars/server.yaml` are sufficient.\nFor example, to run all tests against the live Pulp instance:\n\n```\n./tests/run_container.sh make livetest\n```\n\nOr to record test fixtures for the `rpm_repository` test:\n\n```\n./tests/run_container.sh make record_rpm_repository\n```\n\nBy default, the container will be stopped and removed when the script exits.\nSet `KEEP_CONTAINER=1` to avoid removing the container to allow for debugging.\nSet `IMAGE_TAG=\u003ctag\u003e` to override the default `latest` tag for the `pulp` image.\n\n## Licence\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulp%2Fsqueezer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulp%2Fsqueezer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulp%2Fsqueezer/lists"}