{"id":19624186,"url":"https://github.com/don-rumata/ansible-role-install-aptly","last_synced_at":"2025-10-11T23:11:43.509Z","repository":{"id":177573065,"uuid":"279425534","full_name":"don-rumata/ansible-role-install-aptly","owner":"don-rumata","description":"Ansible role: Install Aptly from https://aptly.info","archived":false,"fork":false,"pushed_at":"2024-11-23T17:21:26.000Z","size":33,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T22:31:46.845Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-role","aptly","aptly-api","aptly-server","deb","debian","repository","ubuntu"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/don_rumata/ansible_role_install_aptly","language":"Jinja","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/don-rumata.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":"2020-07-13T22:33:52.000Z","updated_at":"2024-11-23T17:21:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5464447-1fa2-4a41-9dcb-22688c9289cc","html_url":"https://github.com/don-rumata/ansible-role-install-aptly","commit_stats":null,"previous_names":["don-rumata/ansible-role-install-aptly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/don-rumata/ansible-role-install-aptly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-aptly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-aptly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-aptly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-aptly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/don-rumata","download_url":"https://codeload.github.com/don-rumata/ansible-role-install-aptly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-aptly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009360,"owners_count":26084578,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","ansible-galaxy","ansible-role","aptly","aptly-api","aptly-server","deb","debian","repository","ubuntu"],"created_at":"2024-11-11T11:37:14.097Z","updated_at":"2025-10-11T23:11:43.489Z","avatar_url":"https://github.com/don-rumata.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: Install Aptly\n\n[![License][license-image]][license-url] [![Ansible Galaxy][ansible-galaxy-image]][ansible-galaxy-url] [![Ansible Galaxy Quality][ansible-galaxy-quality-image]][ansible-galaxy-url]\n\nInstall [Aptly](https://www.aptly.info/) on Debian or Ubuntu.\n\n## Work on\n\n```yaml\n  platforms:\n    - name: Ubuntu\n      versions:\n        - xenial\n        - bionic\n        - focal\n    - name: Debian\n      version:\n        - oldstable\n        - stable\n        - testing\n```\n\n## Requirements\n\n[min_ansible_version: 2.8]\n\n## Role Variables\n\n```yaml\n#--- Main section ---#\n# squeeze or nightly: https://www.aptly.info/download/\naptly_repo_version: stable\n# aptly_repo_version: unstable\n\naptly_path_to_local_repo: /var/aptly\n\naptly_user: aptly\n\naptly_group: aptly\n\n#--- API section ---#\naptly_run_api_service: true\n# aptly_run_api_service: false\n\n# https://www.aptly.info/doc/api/\naptly_api_port: 8080\n\n# /lib/systemd/system/aptly-api.service\naptly_api_service_name: aptly-api\n\n#--- First repo serction ---#\naptly_my_first_repo_create: true\n# aptly_create_my_first_repo: false\n\n# https://www.aptly.info/doc/api/repos/ or https://www.aptly.info/doc/aptly/repo/create/\naptly_my_first_repo_create_over: api\n# aptly_my_first_repo_create_over: cli\n\n# aptly repo create \u003cname\u003e\naptly_my_first_repo_name: my-first-repo\n\n# -distribution=\"\" from https://www.aptly.info/doc/aptly/repo/create/\naptly_my_first_repo_distribution: rolling\n\naptly_my_first_repo_comment: Repo generated with https://github.com/don-rumata/ansible-role-install-aptly\n\n# https://wiki.debian.org/ru/SourcesList\naptly_my_first_repo_component: main\n# aptly_my_first_repo_component: contrib\n# aptly_my_first_repo_component: non-free\n\n#--- Software in created repo section ---#\n\n# Viber. Why? Because permanent direct download link.\n# aptly_add_first_software_in_created_repo: true\naptly_add_first_software_in_created_repo: false\n\n#--- GPG section ---#\naptly_gpg_key_generate: true\n# aptly_gpg_key_generate: false\n\naptly_gpg_key_path: '{{ aptly_path_to_local_repo }}/gpg'\n\naptly_gpg_publickey_filename: repo.key\n\naptly_gpg_key_maintainer: Jon Doe\n\naptly_gpg_key_email: aptly@example.com\n\naptly_gpg_key_expire_date: 365\n\n# TODO. aptly_create_gpg_pass: true\\false\naptly_gpg_key_pass: qazwsxedc\n\naptly_gpg_key_comment: with stupid passphrase\n\naptly_gpg_key_type: RSA\n\naptly_gpg_key_length: 4096\n\n#!!! ALL accesses in READ ONLY 4 all !!!#\n\n#--- www section ---#\naptly_www_access: true\n# aptly_www_access: false\n\naptly_www_webdav_access: true\n# aptly_www_webdav_access: false\n\n# http://localhost/deb \u003c---\naptly_www_module_name: deb\n\naptly_www_port: 80\n\naptly_www_backend: nginx\n# aptly_www_backend: lighttpd\n# aptly_www_backend: apache\n\naptly_www_local_path: /var/www/{{ aptly_www_module_name }}\n\n#--- rsync section ---#\naptly_rsync_access: true\n# aptly_rsync_access: false\n\n# rsync://localhost/deb \u003c---\naptly_rsync_module_name: deb\n\naptly_rsync_local_path: '{{ aptly_path_to_local_repo }}/public'\n\n#--- ftp section ---#\naptly_ftp_access: true\n# aptly_ftp_access: false\n\n# ftp://localhost/deb \u003c---\naptly_ftp_module_name: deb\n\n# \"anon_root\" in vsftpd.conf\naptly_ftp_anon_root_dir: /srv/ftp\n\naptly_ftp_local_path: '{{ aptly_ftp_anon_root_dir }}/{{ aptly_ftp_module_name }}'\n\n#--- nfs section ---#\naptly_nfs_access: true\n# aptly_nfs_access: false\n```\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\nInstall stable version `aptly` with:\n\n- Create service user for aptly\n- Install and config aptly api daemon\n- Create \"Hello, World!\" repository\n- Generate gpg keys for sign repository (**WARNING!!!** WITHOUT PASSPHRASE!!!)\n- Share repository over (all accesses in **read only**):\n  - http (nginx)\n  - webdav (nginx)\n  - rsync (rsyncd)\n  - ftp (vsftpd)\n  - nfs (nfs-kernel-server)\n\n`install-aptly.yml`:\n\n```yaml\n- name: Install Aptly\n  hosts: all\n  strategy: free\n  serial:\n    - \"100%\"\n  roles:\n    - ansible-role-install-aptly\n  tasks:\n```\n\nInstall **un**stable version `aptly` without all features:\n\n```yaml\n- name: Install Aptly\n  hosts: all\n  strategy: free\n  serial:\n    - \"100%\"\n  roles:\n    - ansible-role-install-aptly\n  vars:\n    aptly_repo_version: unstable\n    aptly_run_api_service: false\n    aptly_create_my_first_repo: false\n    aptly_add_first_software_in_created_repo: false\n    aptly_gpg_key_generate: false\n    aptly_www_access: false\n    aptly_www_webdav_access: false\n    aptly_rsync_access: false\n    aptly_ftp_access: false\n    aptly_nfs_access: false\n  tasks:\n```\n\nInstall stable version `aptly`, with create repo over cli and share **empty** repo over apache on port 83:\n\n```yaml\n- name: Install Aptly\n  hosts: all\n  strategy: free\n  serial:\n    - \"100%\"\n  roles:\n    - ansible-role-install-aptly\n  vars:\n    aptly_run_api_service: false\n    aptly_create_my_first_repo: true\n    aptly_my_first_repo_create_over: cli\n    aptly_add_first_software_in_created_repo: false\n    aptly_gpg_key_generate: false\n    aptly_www_access: true\n    aptly_www_backend: apache\n    aptly_www_webdav_access: false\n    aptly_www_port: 83\n    aptly_rsync_access: false\n    aptly_ftp_access: false\n    aptly_nfs_access: false\n  tasks:\n```\n\n## Add your repo in your Debian\\Ubuntu\n\n`10.10.10.10` - example ip.\n\n### Over http\n\n```bash\necho \"deb http://10.10.10.10/deb rolling main\" | sudo tee --append /etc/apt/sources.list.d/my-awesome-repo.list\n```\n\n```bash\nwget -q -O - http://10.10.10.10/deb/repo.key | sudo apt-key add -\n```\n\n### Over ftp\n\n```bash\necho \"deb ftp://10.10.10.10/deb rolling main\" | sudo tee --append /etc/apt/sources.list.d/my-awesome-repo.list\n```\n\n```bash\nwget -q -O - ftp://10.10.10.10/deb/repo.key | sudo apt-key add -\n```\n\n### Over NFS\n\n```bash\nsudo mkdir /var/repo\n```\n\n```bash\nmount.nfs 10.10.10.10:/var/aptly/public /var/repo\n```\n\n```bash\necho \"deb file:/var/repo rolling main\" | sudo tee --append /etc/apt/sources.list.d/my-awesome-repo.list\n```\n\n```bash\nsudo apt-key add /var/repo/repo.key\n```\n\nFor permanent mount:\n\n```bash\necho \"10.10.10.10:/var/aptly/public /var/repo nfs noatime,nodiratime 0 0\" | sudo tee --append /etc/fstab\n```\n\n### Over webdav\n\n*Comming soon*.\n\n### After all\n\n```bash\nsudo apt update\n```\n\n## License\n\nApache License, Version 2.0\n\n## Author Information\n\n[don Rumata](https://github.com/don-rumata)\n\n## TODO\n\n- Add tests.\n- Add `aptly_create_gpg_pass: true\\false`.\n- Add example for webdav.\n\n[license-image]: https://img.shields.io/github/license/don-rumata/ansible-role-install-aptly.svg\n[license-url]: https://opensource.org/licenses/Apache-2.0\n\n[ansible-galaxy-image]: https://img.shields.io/badge/ansible_galaxy-don__rumata.ansible__role__install__aptly-blue.svg\n[ansible-galaxy-url]: https://galaxy.ansible.com/don_rumata/ansible_role_install_aptly\n\n[ansible-galaxy-quality-image]: https://img.shields.io/ansible/quality/49710\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdon-rumata%2Fansible-role-install-aptly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdon-rumata%2Fansible-role-install-aptly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdon-rumata%2Fansible-role-install-aptly/lists"}