{"id":18925626,"url":"https://github.com/jm1/ansible-collection-jm1-pkg","last_synced_at":"2026-03-14T15:30:18.308Z","repository":{"id":69767414,"uuid":"276893018","full_name":"JM1/ansible-collection-jm1-pkg","owner":"JM1","description":"Ansible Collection for Software Packaging and Deployment https://galaxy.ansible.com/jm1/pkg","archived":false,"fork":false,"pushed_at":"2025-01-30T16:16:31.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T17:27:29.024Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/JM1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-07-03T12:19:55.000Z","updated_at":"2025-01-30T16:16:35.000Z","dependencies_parsed_at":"2024-07-10T16:09:11.587Z","dependency_job_id":"01080045-9a9d-4d74-b365-9d506fa3c3ea","html_url":"https://github.com/JM1/ansible-collection-jm1-pkg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JM1%2Fansible-collection-jm1-pkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JM1%2Fansible-collection-jm1-pkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JM1%2Fansible-collection-jm1-pkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JM1%2Fansible-collection-jm1-pkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JM1","download_url":"https://codeload.github.com/JM1/ansible-collection-jm1-pkg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921844,"owners_count":19718844,"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-11-08T11:12:38.975Z","updated_at":"2026-03-14T15:30:18.269Z","avatar_url":"https://github.com/JM1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection for Software Packaging and Deployment\n\nThis repo hosts the Ansible collection [`jm1.pkg`](https://galaxy.ansible.com/jm1/pkg).\n\nThe collection includes a variety of Ansible content to help with packaging and deployment of software.\n\nFor example, Ansible module [`jm1.pkg.meta_pkg`][jm1-pkg-meta-pkg] simplifies the build, installation and removal of\nmeta packages using the OS package manager, such as `apt`, `yum` or `dnf`. A meta package does not include any files, it\nrather defines [relationships][debian-policy-relationships] between packages only, e.g. dependencies or conflicts. When\na meta package is installed, the OS package manager will install or remove packages automatically to satisfy all\nrelationships declared by the meta package. This helps to keep your system clean e.g. when packages should be removed\nduring upgrades or updates to Ansible playbooks: Previously installed packages which are removed from the meta package\ndependencies, will be uninstalled automatically by the OS package manager once the new meta package version is rolled\nout.\n\n[debian-policy-relationships]: https://www.debian.org/doc/debian-policy/ch-relationships.html\n[jm1-pkg-meta-pkg]: plugins/modules/meta_pkg.py\n\nFor example:\n\n1. We start our coding career with Subversion:\n    ```yaml\n    - hosts: all\n      tasks:\n        - name: Install software required by jm1.pkg's roles and modules\n          import_role:\n            name: jm1.pkg.setup\n\n        - name: Install C development tools\n          jm1.pkg.meta_pkg:\n            name: developer-tools\n            version: '1'\n            depends:\n            - make\n            - gcc\n            - subversion\n            - vim\n    ```\n\n2. Later we want to switch from Subversion to Git:\n    ```yaml\n    - hosts: all\n      tasks:\n        - name: Install software required by jm1.pkg's roles and modules\n          import_role:\n            name: jm1.pkg.setup\n\n        - name: Install C development tools\n          jm1.pkg.meta_pkg:\n            name: developer-tools\n            version: '2'\n            depends:\n            - make\n            - gcc\n            - git\n            - vim\n    ```\n\nWhen the second release of `developer-tools` is installed, the OS package manager might [`autoremove`](https://dnf.readthedocs.io/en/latest/command_ref.html#autoremove-command-label)\n`subversion` if no other package depends on it anymore.\n\n## Included content\n\nClick on the name of a module or role to view that content's documentation:\n\n- **Modules**:\n    * [meta_pkg](plugins/modules/meta_pkg.py)\n- **Roles**:\n    * [apt_repository](roles/apt_repository/README.md)\n    * [apt_sources_list_removal](roles/apt_sources_list_removal/README.md)\n    * [setup](roles/setup/README.md)\n    * [yum_repository](roles/yum_repository/README.md)\n\n## Requirements and Installation\n\n### Installing necessary software\n\nContent in this collection requires additional roles and collections, e.g. to collect operating system facts. You can\nfetch them from Ansible Galaxy using the provided [`requirements.yml`](requirements.yml):\n\n```sh\nansible-galaxy collection install --requirements-file requirements.yml\nansible-galaxy role install --role-file requirements.yml\n# or\nmake install-requirements\n```\n\nContent in this collection requires additional tools and libraries, e.g. to interact with apt's, yum's and dnf's APIs.\nYou can use role [`jm1.pkg.setup`](roles/setup/README.md) to install necessary software packages:\n\n```yaml\n- hosts: all\n  roles:\n    - jm1.pkg.setup\n```\n\nOr to install these packages locally:\n\n```sh\nsudo -s\n\nansible-console localhost \u003c\u003c EOF\ngather_facts\ninclude_role name=jm1.pkg.setup\nEOF\n```\n\nThe exact requirements for every module and role are listed in the corresponding documentation.\nSee the module documentations for the minimal version supported for each module.\n\n### Installing the Collection from Ansible Galaxy\n\nBefore using the `jm1.pkg` collection, you need to install it with the Ansible Galaxy CLI:\n\n```sh\nansible-galaxy collection install jm1.pkg\n```\n\nYou can also include it in a `requirements.yml` file and install it via\n`ansible-galaxy collection install -r requirements.yml`, using the format:\n\n```yaml\n---\ncollections:\n  - name: jm1.pkg\n    version: 2024.7.10\n```\n\n## Usage and Playbooks\n\nYou can either call modules by their Fully Qualified Collection Name (FQCN), like `jm1.pkg.meta_pkg`, or you can call\nmodules by their short name if you list the `jm1.pkg` collection in the playbook's `collections`, like so:\n\n```yaml\n---\n- name: Using jm1.pkg collection\n  hosts: localhost\n\n  collections:\n    - jm1.pkg\n\n  tasks:\n    - name: Satisfy software requirements\n      import_role:\n        name: setup\n\n    - name: Create and install a new meta package\n      meta_pkg:\n        name: \"developer-tools\"\n        depends:\n        - make\n        - gcc\n        - git\n        - vim\n```\n\nFor documentation on how to use individual modules and other content included in this collection, please see the links\nin the 'Included content' section earlier in this README.\n\nSee [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more\ndetails.\n\n## Contributing\n\nThere are many ways in which you can participate in the project, for example:\n\n- Submit bugs and feature requests, and help us verify them\n- Submit pull requests for new modules, roles and other content\n\nWe're following the general Ansible contributor guidelines;\nsee [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).\n\nIf you want to develop new content for this collection or improve what is already here, the easiest way to work on the\ncollection is to clone this repository (or a fork of it) into one of the configured [`ANSIBLE_COLLECTIONS_PATHS`](\nhttps://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths) and work on it there:\n1. Create a directory `ansible_collections/jm1`;\n2. In there, checkout this repository (or a fork) as `pkg`;\n3. Add the directory containing `ansible_collections` to your\n   [`ANSIBLE_COLLECTIONS_PATHS`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths).\n\nHelpful tools for developing collections are `ansible`, `ansible-doc`, `ansible-galaxy`, `ansible-lint`, `flake8`,\n`make` and `yamllint`.\n\n| OS                                           | Install Instructions                                                |\n| -------------------------------------------- | ------------------------------------------------------------------- |\n| Debian 10 (Buster)                           | Enable [Backports](https://backports.debian.org/Instructions/). `apt install ansible ansible-doc ansible-lint flake8 make yamllint` |\n| Debian 11 (Bullseye)                         | `apt install ansible ansible-lint flake8 make yamllint` |\n| Debian 12 (Bookworm)                         | `apt install ansible ansible-lint flake8 make yamllint` |\n| Debian 13 (Trixie)                           | `apt install ansible ansible-lint flake8 make yamllint` |\n| Fedora                                       | `dnf install ansible python3-flake8 make yamllint` |\n| Red Hat Enterprise Linux (RHEL) 7 / CentOS 7 | Enable [EPEL](https://fedoraproject.org/wiki/EPEL). `yum install ansible ansible-lint ansible-doc  python-flake8 make yamllint` |\n| Red Hat Enterprise Linux (RHEL) 8 / CentOS 8 | Enable [EPEL](https://fedoraproject.org/wiki/EPEL). `yum install ansible                          python3-flake8 make yamllint` |\n| Red Hat Enterprise Linux (RHEL) 9 / CentOS 9 | Enable [EPEL](https://fedoraproject.org/wiki/EPEL). `yum install ansible                          python3-flake8 make yamllint` |\n| Ubuntu 18.04 LTS (Bionic Beaver)             | Enable [Launchpad PPA Ansible by Ansible, Inc.](https://launchpad.net/~ansible/+archive/ubuntu/ansible). `apt install ansible ansible-doc ansible-lint flake8 make yamllint` |\n| Ubuntu 20.04 LTS (Focal Fossa)               | Enable [Launchpad PPA Ansible by Ansible, Inc.](https://launchpad.net/~ansible/+archive/ubuntu/ansible). `apt install ansible ansible-doc ansible-lint flake8 make yamllint` |\n| Ubuntu 22.04 LTS (Jammy Jellyfish)           | `apt install ansible ansible-lint flake8 make yamllint` |\n| Ubuntu 24.04 LTS (Noble Numbat)              | `apt install ansible ansible-lint flake8 make yamllint` |\n\nHave a look at the included [`Makefile`](Makefile) for\nseveral frequently used commands, to e.g. build and lint a collection.\n\n## More Information\n\n- [Ansible Collection Overview](https://github.com/ansible-collections/overview)\n- [Ansible User Guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)\n- [Ansible Developer Guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)\n- [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)\n\n## License\n\nGNU General Public License v3.0 or later\n\nSee [LICENSE.md](LICENSE.md) to see the full text.\n\n## Author\n\nJakob Meng\n@jm1 ([github](https://github.com/jm1), [galaxy](https://galaxy.ansible.com/jm1), [web](http://www.jakobmeng.de))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjm1%2Fansible-collection-jm1-pkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjm1%2Fansible-collection-jm1-pkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjm1%2Fansible-collection-jm1-pkg/lists"}