{"id":16897689,"url":"https://github.com/cevich/subscribed","last_synced_at":"2026-05-16T21:37:09.388Z","repository":{"id":79003524,"uuid":"119262675","full_name":"cevich/subscribed","owner":"cevich","description":"Subscribe or un-subscribe a RHEL subject with subscription-manager command.","archived":false,"fork":false,"pushed_at":"2018-07-09T20:19:02.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T11:41:22.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cevich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-01-28T13:53:17.000Z","updated_at":"2018-07-09T20:19:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fd474aa-1df7-4d35-8780-403e480b119c","html_url":"https://github.com/cevich/subscribed","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/cevich%2Fsubscribed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cevich%2Fsubscribed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cevich%2Fsubscribed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cevich%2Fsubscribed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cevich","download_url":"https://codeload.github.com/cevich/subscribed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244600725,"owners_count":20479307,"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-10-13T17:39:18.160Z","updated_at":"2026-05-16T21:37:04.367Z","avatar_url":"https://github.com/cevich.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Subscribed\n==========\n\n[Ansible Galaxy enabled](https://galaxy.ansible.com/cevich/subscribed)\nrole to subscribe or un-subscribe a RHEL\nsubject purely through the native subscription-manager command.\nThis works around several niggly problems with the stock Ansible\nrole, under some specific conditions.  Unfortunately, the details\nof the conditions is proprietary information.\n\nRequirements\n------------\n\nSame as stock Ansible ``2.3+``\n\nRole Variables\n--------------\n\n`rhsm`:\n    Dictionary of registration and subscription options described below.\n    Required unless ``unsubscribe`` is ``True``\n\n`rhsm.username`:\n    Required, user name to pass when registering.  Will not be logged or\n    displayed, even under verbose mode.\n\n`rhsm.password`:\n    Required, corresponding password to use when registering.  Will not be logged or\n    displayed, even under verbose mode.\n\n`rhsm.baseurl`:\n    Optional, the URL for the subscription content server.\n\n`rhsm.serverurl`:\n    Optional, the URL for the registration server.\n\n`rhsm.insecure`:\n    Defaults to ``False``, allow registration and content retrieval\n    using unencrypted or unverifiable secure communication channels.\n\n`rhsm.release`:\n    Optional, if non-empty, a string describing major.minor release to\n    lock host onto.  Enables retrieval of EUS a.k.a. z-stream updates.\n\n`rhsm.org`:\n    Optional, unless this is a username/password represent a sub-account\n    and/or multiple-organizations are configured on the account. The\n    command ``subscription-manager orgs`` with the above username/password\n    options will display the org. id. number.\n\n`rhsm.force`:\n    Defaults to ``False``, allows forcing re-registering of a host\n    that matches an already registered host, with a different identity\n    certificate.  With out being forced in this situation, multiple\n    subscriptions would be consumed by entries with the same hostname\n    but different identities.\n\n`unsubscribe`:\n    Defaults to ``False``, unsubscribe the host.  Required when used\n    under ``roles `` directly, instead of ``include_role`` where the\n    ``unsubscribe.yml`` can be specified to ``tasks_from ``.\n\n`rhsm_retries`:\n    Defaults to ``3``, the number of times to re-try a failed command.\n\n`rhsm_delay`:\n    Defaults to ``10``, the number of seconds to wait between retries.\n\n\nDependencies\n------------\n\nA RHEL 6+ system able to communicate with ``rhsm.redhat.com``, a SAM, or satellite server.\n\nExample Playbooks\n----------------\n\n**Register / Subscribe**\n\n```yaml\n    - hosts: all\n      vars_files:\n        - '/path/to/rhsm_vault.yml'  # defines _vault_rhsm\n\n      pre_tasks:\n        - name: System is registered and subscribed\n          include_role:\n            name: cevich.subscribed\n            private: True  # optional, hide vars outside role\n          vars:\n            rhsm: '{{ _vault_rhsm }}'\n          when: rhsm | default({}, True) | length\n```\n\n**Unsubscribe / Deregister**\n\n```yaml\n    - hosts: all\n\n      post_tasks:\n        - name: System is un-subscribed and de-registered\n          include_role:\n            name: cevich.subscribed\n            private: True  # for the truely paranoid\n          vars:\n            unsubscribe: True\n```\n\nLicense\n-------\n\n    Subscribe or un-subscribe a RHEL subject with subscription-manager command.\n    Copyright (C) 2017  Christopher C. Evich\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n\nAuthor Information\n------------------\n\nCausing trouble and inciting mayhem with Linux since Windows 98\n\nContinuous Integration\n----------------------\n\nTravis CI: [![Build Status](https://travis-ci.org/cevich/subscribed.svg?branch=master)](https://travis-ci.org/cevich/subscribed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcevich%2Fsubscribed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcevich%2Fsubscribed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcevich%2Fsubscribed/lists"}