{"id":18363434,"url":"https://github.com/stuttgart-things/install-requirements","last_synced_at":"2026-05-10T06:43:22.298Z","repository":{"id":175272118,"uuid":"610221658","full_name":"stuttgart-things/install-requirements","owner":"stuttgart-things","description":"install, remove and update python and/or os packages","archived":false,"fork":false,"pushed_at":"2024-12-17T06:17:40.000Z","size":137,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-15T19:38:30.813Z","etag":null,"topics":["ansible","apt","dnf","linux","pip","python","requirements"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuttgart-things.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":"2023-03-06T10:42:52.000Z","updated_at":"2024-05-11T13:47:24.000Z","dependencies_parsed_at":"2023-11-25T09:44:56.002Z","dependency_job_id":"cbdfbfbc-7fa8-46b3-9e04-116ac61078fc","html_url":"https://github.com/stuttgart-things/install-requirements","commit_stats":null,"previous_names":["stuttgart-things/install-requirements"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Finstall-requirements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Finstall-requirements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Finstall-requirements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Finstall-requirements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuttgart-things","download_url":"https://codeload.github.com/stuttgart-things/install-requirements/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248173850,"owners_count":21059595,"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":["ansible","apt","dnf","linux","pip","python","requirements"],"created_at":"2024-11-05T23:06:29.577Z","updated_at":"2026-05-10T06:43:22.292Z","avatar_url":"https://github.com/stuttgart-things.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"stuttgart-things/install-requirements\n====================\n\ninstall, remove and update python and/or os packages.\n\n\u003cdetails\u003e\u003csummary\u003eVARIABLES\u003c/summary\u003e\n\nThe following vars can be set:\n```yaml\nvars:\n  update_packages: true     # set for update or not update your os packages (update_packages: true/ false)\n  os_packages:\n    - htop\n    - unzip # the os package that you want to install. If not set, no os package will be installed. (os_packages: \u003cpackage_name\u003e)\n  python_modules:\n    - name: kubernetes      # the pip package that you want to install. If not set, no os package will be installed. If pip doesn't exist, it will be installed automatically. The pip version is decided based on the python version that is used by ansible on the target host.\n      version: 10.0.1       # - python_modules: \u003cpackage_name\u003e\n    - name: openshift       #   version: \u003cpackage_version\u003e\n  ansible_collections:\n    podman:\n      name: containers.podman\n      version: 1.3.1\n    general:\n      name: community.general\n      version: 1.2.0\n    crypto:\n      name: community.crypto\n      version: 1.2.0\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eDEFAULTS\u003c/summary\u003e\n\n```yaml\n...\npacker_update_packages: false\n\npacker_python_modules:\n  - name: netaddr\n\npacker_os_prerequisites:\n  - unzip\n  - git\n  - ansible\n...\n\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eROLE INSTALLATION\u003c/summary\u003e\n\n```bash\ncat \u003c\u003cEOF \u003e /tmp/requirements.yaml\n- src: https://github.com/stuttgart-things/install-requirements.git\n  scm: git\nEOF\n\nansible-galaxy install -r /tmp/requirements.yaml --force\nrm -rf /tmp/requirements.yaml\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eEXAMPLE INVENTORY\u003c/summary\u003e\n\n```bash\ncat \u003c\u003cEOF \u003e inventory\n[appserver]\n1.2.3.4 ansible_user=sthings\nEOF\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eEXAMPLE PLAYBOOK\u003c/summary\u003e\n\nThis playbook install the htop os package and the python module kubernetes with the version 10.0.1 and the latest openshift python module.\n\n```yaml\ncat \u003c\u003cEOF \u003e install-requirements.yaml\n---\n- name: Install packages\n  hosts: localhost\n  gather_facts: true\n  become: true\n  vars:\n    update_packages: true\n    os_packages:\n      - htop\n      - unzip\n    python_modules:\n      - name: kubernetes\n        version: 10.0.1\n      - name: openshift\n\n  roles:\n    - install-requirements\nEOF\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eEXAMPLE EXECUTION\u003c/summary\u003e\n\n```bash\nansible-playbook -i inventory install-requirements.yml\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eEXAMPLE ROLE INCLUDE OF ANOTHER ROLE\u003c/summary\u003e\n\n```yaml\n# task file\n...\n- name: Install prerequisites\n  include_role:\n    name: install-requirements\n  vars:\n    update_packages: \"{{ packer_update_packages }}\"\n    os_packages: \"{{ packer_os_prerequisites }}\"\n    python_modules: \"{{ packer_python_modules }}\"\n  tags: setup\n...\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eLICENSE\u003c/summary\u003e\n\nCopyright 2020 patrick hermann.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\u003c/details\u003e\n\n## Role history\n\n| date  | who | changelog |\n|---|---|---|\n|2024-05-07   | Andre Ebert | linting and testing on different OS\n|2020-10-21   | Marcel Zapf | fixed problem debian system not update os packages\n|2020-10-16   | Patrick Hermann | added task to install ansible collections\n|2020-10-08   | Marcel Zapf | fixed some bugs\n|2020-08-24   | Patrick Hermann  | fixed task names, fixed os task loop\n|2020-08-18   | Marcel Zapf   | initial commit, added tests and readme\n\nAuthor Information\n------------------\n\n```yaml\nAndre Ebert (andre.ebert@sva.de); 05/2024\n\nMarcel Zapf (marcel.zapf@sva.de; Stuttgart-Things; 08/2020);\n\nPatrick Hermann (patrick.hermann@sva.de; Stuttgart-Things; 08/2020)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Finstall-requirements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuttgart-things%2Finstall-requirements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Finstall-requirements/lists"}