{"id":18906531,"url":"https://github.com/claranet/ansible-role-apt","last_synced_at":"2026-02-25T19:13:07.837Z","repository":{"id":148145241,"uuid":"525273700","full_name":"claranet/ansible-role-apt","owner":"claranet","description":"Configure APT","archived":false,"fork":false,"pushed_at":"2024-07-01T09:58:07.000Z","size":159,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-10-26T22:42:50.466Z","etag":null,"topics":["ansible","apt","claranet","role"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/claranet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-16T07:25:53.000Z","updated_at":"2024-07-01T09:31:51.000Z","dependencies_parsed_at":"2024-04-01T08:54:09.071Z","dependency_job_id":null,"html_url":"https://github.com/claranet/ansible-role-apt","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/claranet/ansible-role-apt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-apt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-apt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-apt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-apt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claranet","download_url":"https://codeload.github.com/claranet/ansible-role-apt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-apt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29835563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T19:08:47.527Z","status":"ssl_error","status_checked_at":"2026-02-25T18:59:04.705Z","response_time":61,"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":["ansible","apt","claranet","role"],"created_at":"2024-11-08T09:16:39.456Z","updated_at":"2026-02-25T19:13:06.340Z","avatar_url":"https://github.com/claranet.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible role - apt\n[![Maintainer](https://img.shields.io/badge/maintained%20by-claranet-e00000?style=flat-square)](https://www.claranet.fr/)\n[![License](https://img.shields.io/github/license/claranet/ansible-role-apt?style=flat-square)](LICENSE)\n[![Release](https://img.shields.io/github/v/release/claranet/ansible-role-apt?style=flat-square)](https://github.com/claranet/ansible-role-aot/releases)\n[![Status](https://img.shields.io/github/actions/workflow/status/claranet/ansible-role-apt/molecule.yml?style=flat-square\u0026label=tests\u0026branch=main)](https://github.com/claranet/ansible-role-apt/actions?query=workflow%3A%22Ansible+Molecule%22)\n[![Ansible version](https://img.shields.io/badge/ansible-%3E%3D2.10-black.svg?style=flat-square\u0026logo=ansible)](https://github.com/ansible/ansible)\n[![Ansible Galaxy](https://img.shields.io/badge/ansible-galaxy-black.svg?style=flat-square\u0026logo=ansible)](https://galaxy.ansible.com/claranet/apt)\n\n\u003e :star: Star us on GitHub — it motivates us a lot!*\n\nInstall packages and add repositories on apt based distributions :\n\n## :warning: Requirements\n\nAnsible \u003e= 2.10\n\n## :zap: Installation\n\n```bash\nansible-galaxy install claranet.apt\n```\n## :gear: Role variables\n--------------\n\nVariable                                      | Default value                                              | Description\n----------------------------------------------|------------------------------------------------------------|--------------------------------------\napt_upgrade                                   | **false**                                                  | Do an upgrade (no, yes, safe, full, dist)\napt_autoremove                                | **true**                                                   | Remove packages that are no longer needed for dependencies\napt_packages                                  | **[]**                                                     | Packages list to install\napt_repositories                              | **[[]](molecule/ppa-package-install/converge.yml#L12)**    | Repositories list to configure\napt_ppas                                      | **[[]](molecule/ppa-package-install/converge.yml#L19)**    | PPA repositories to add\napt_force                                     | **false**                                                  | Force installs / removes\napt_install_recommends                        | **false**                                                  | Install recommended packages\napt_dpkg_options                              | **\"\"**                                                     | Add dpkg options to apt command\napt_default_release                           | **\"\"**                                                     | Set pin priorities (like apt -t)\napt_config_default                            | **[defaults/main.yml](defaults/main.yml#L16)**             | Defaut config for apt, every new config will be merge with it\napt_config                                    | **{}**                                                     | New config to set, it will be merge with apt_default_config\napt_config_additional_preformatted_config     | **''**                                                     | Additional preformatted config\napt_config_listchanges_mail                   | **null**                                                   | List changes mail\napt_config_unattended_upgrades_package_state  | **'auto'**                                                 | Unattended upgrades package state\napt_config_unattended_upgrades_timer_override | **null**                                                   | Unattended upgrades timer override\napt_config_listchanges_package_state          | **'auto'**                                                 | List changes package state\n\n## :arrows_counterclockwise: Dependencies\n\nN/A\n\n## :pencil2: Example Playbook\n\nInstall packages\n\n```yaml\n- name: bootstrap instance\n  hosts: all\n  tasks:\n    - include_role:\n        name: apt\n      vars:\n        apt_packages:\n          # latest packages\n          - name: tree\n          - name: python-pip\n          # specific package version\n          - name: vim=2:8.*\n          # deb file\n          - deb: \"http://repo.zabbix.com/zabbix/6.1/{{ ansible_distribution | lower }}/pool/main/z/zabbix-release/zabbix-release_6.1-2+{{ ansible_distribution |lower }}{{ ansible_distribution_version }}_all.deb\"ansible_distribution_release }}_all.deb\n```\n\nPPA package installation\n\n```yaml\n- name: ppa-package-install\n  hosts: all\n  become: true\n  roles:\n    - role: claranet.apt\n  vars:\n    apt_upgrade: true\n    apt_ppas:\n      # nginx ppa repo\n      - repo: ppa:nginx/stable\n        # not needed on ubuntu distribution\n        codename: trusty\n    apt_repositories:\n      - types: deb # can be string or list\n        urls: \"https://deb.nodesource.com/node_18.x\"\n        suites: \"{{ ansible_distribution_release | lower }}\"\n        components: \"main\"\n        key: https://deb.nodesource.com/gpgkey/nodesource.gpg.key # can be url or content of file\n        # key: \"{{ lookup('url', 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key', split_lines=False) }}\"\n    apt_packages:\n      - name: nginx\n      - name: nodejs\n```\n\nDo an upgrade\n\n```yaml\n- hosts: all\n  vars:\n    # could be safe | full | dist\n    apt_upgrade: true\n  roles:\n    - apt\n```\n\n## :closed_lock_with_key: [Hardening](HARDENING.md)\n\n## :heart_eyes_cat: [Contributing](CONTRIBUTING.md)\n\n## :copyright: [License](LICENSE)\n\n[Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaranet%2Fansible-role-apt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaranet%2Fansible-role-apt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaranet%2Fansible-role-apt/lists"}