{"id":20331004,"url":"https://github.com/cans/package-source","last_synced_at":"2026-03-05T23:05:55.373Z","repository":{"id":139898281,"uuid":"88487658","full_name":"cans/package-source","owner":"cans","description":"Ansible role to manage distribution package sources and encryption keys","archived":false,"fork":false,"pushed_at":"2019-08-24T09:28:32.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T12:29:02.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cans.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":"2017-04-17T08:24:33.000Z","updated_at":"2023-03-28T20:43:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"febf63c2-05c0-4ad3-aed9-47c276feabae","html_url":"https://github.com/cans/package-source","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cans/package-source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cans%2Fpackage-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cans%2Fpackage-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cans%2Fpackage-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cans%2Fpackage-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cans","download_url":"https://codeload.github.com/cans/package-source/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cans%2Fpackage-source/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30154312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-14T20:18:27.571Z","updated_at":"2026-03-05T23:05:55.357Z","avatar_url":"https://github.com/cans.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"cans.package-source\n===================\n\n[![Build Status](https://travis-ci.org/cans/package-source.svg?branch=master)](https://travis-ci.org/cans/package-sources)\n[![Ansible Galaxy](https://img.shields.io/badge/ansible--galaxy-cans.package--source-blue.svg?style=flat-square)](https://galaxy.ansible.com/cans/package-source)\n[![License](https://img.shields.io/badge/license-GPLv2-brightgreen.svg?style=flat-square)](LICENSE)\n\nSimple role to add and / or remove distribution package sources and\ntheir respective GPG keys.\n\n\nEach package source to be added or removed must be described as\nfollows:\n\n    - repo: \"name of the repository\"      # required\n      codename: \"\u003cDistro codename\u003e\"       # optional, default: undefined\n      key_id: \"\u003cGPG Key ID\u003e\"              # optional, default: undefined\n      key_server: \"\u003ckey server url\u003e\"      # optional, default: undefined\n      key_url: \"\u003cpublic key file url\u003e\"    # optional, default: undefined\n      keyring: \"\u003cpath to keyring\u003e\"        # optional, default: undefined\n      update_cache: \u003cyes|no\u003e              # optional, default: no\n\nThis role will add, then remove sources. And since the repositories\nare specified in lists, the order in which they are added or removed is\ndeterministic and as specified in your playbook.\n\nAll values with an _undefined_ default will simply be omitted if not\nspecified.\n\nThe `repo` is the one and only mandatory value and should be a valid\nAPT repository description line.\n\nIf you want to install a key alongside a given source, you *must*\nspecify the `key_id`, to avoid inserting undesired key in APT's\nkeyring. Then either of `key_url` or `key_server` become mandatory, so\nthe key can be retrieve somehow.\n\nChanging the default value of `update_cache` is generally not a good\nidea, as slows down your playbook terribly. And anyways, if you add\npackage sources, it is most likely to use them a short while latter. It\nis recommanded to update the cache then and not when you add the source.\nNote that is has the drawback of not validating your new repositories.\nIf you still want that validation to occur during the execution of this\nrole, use `update_cache` has shown in the\n[example playbook](#example-playbook) below.\n\n\nRequirements\n------------\n\nThis package has the requirements of Ansible's distribution package\nsources management modules:\n\n- For Debian based distributions see [apt\\_repository](http://docs.ansible.com/ansible/apt_repository_module.html)\n  and [apt\\_key](http://doc.ansible.com/ansible/apt_key_module.html) modules;\n\n\n\nRole Variables\n--------------\n\nAll the variables from this module are namespaced with the prefix\n`pkgsources`.\n\n- `pkgsource_present`: the list of sources you want to make sure are\n  available (default: `[]`);\n- `pkgsource_absent`: the list of sources you want to make sure are\n  *not* available (default: `[]`);\n\n\n### Deprecated variables\n\n- `pkgsource_user`: this variable has been deprecated, as you can define\n  this as you import the role or at the play level. The variable was in fact\n  not used (default: `ansible_user_id`).\n\n\nDependencies\n------------\n\nThis role has no external dependencies.\n\n\nExample Playbook \u003ca name=\"example-playbook\"\u003e\u003c/a\u003e\n----------------\n\nIn this playbook, we add two new sources to APT and remove one.\nWith the second added source, we will also install the repository's GPG\nkey. Finally, since this role adds then removes repositories, on the\nlast (and only) removed repository removed, we force a cache update\nthat ensure the configuration is valid indeed and APT can verify all\nrepositories and packages signatures.\n\n    - hosts: servers\n      roles:\n         - role: \"cans.package-source\"\n           pkgsource_present:\n             # Simply ensure Debian current release backport packages repository\n             # is available\n             - repo: \"deb http://ftp.fr.debian.org/debian/ stable-backports main\"\n\n             # Heroku's toolbelt repository (cli tool)\n             - repo: \"deb https://toolbelt.heroku.com/ubuntu/ ./\"\n               # These two lines will ensure Heroku's GPG key is intalled *before*\n               # adding the repository to the source list.\n               key_id: C927EBE00F1B0520\n               key_url: \"https://toolbelt.herokuapp.com/apt/release.key\"\n\n           # The deprecated sources you want removed.\n           pkgsource_absent:\n             - \"deb http://ftp.fr.debian.org/debian/ wheezy main\"\n               # Force cache update on last repository added or removed so the new\n               # configuration is validated\n               update_cache: yes\n\n\nLicense\n-------\n\nThe Ansible role package-source is free software: you can\nredistribute it and/or modify it under the terms of the GNU General\nPublic License version 2 as published by the Free Software Foundation.\n\npackage-sources is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with package-sources. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n\nAuthor Information\n------------------\n\nCopyright © 2017-2018, Nicolas CANIART.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcans%2Fpackage-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcans%2Fpackage-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcans%2Fpackage-source/lists"}