{"id":20659466,"url":"https://github.com/ialejandro/ansible-role-harbor","last_synced_at":"2026-01-31T11:03:23.886Z","repository":{"id":251233408,"uuid":"750824003","full_name":"ialejandro/ansible-role-harbor","owner":"ialejandro","description":"Ansible Role - Harbor","archived":false,"fork":false,"pushed_at":"2025-12-01T19:51:55.000Z","size":28,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-04T09:54:20.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ialejandro.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-31T11:49:51.000Z","updated_at":"2025-12-01T19:51:52.000Z","dependencies_parsed_at":"2025-10-17T00:09:37.290Z","dependency_job_id":"2b8a73f0-c658-4e5d-97cc-1ff382f9c794","html_url":"https://github.com/ialejandro/ansible-role-harbor","commit_stats":null,"previous_names":["ialejandro/ansible-role-harbor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ialejandro/ansible-role-harbor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialejandro%2Fansible-role-harbor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialejandro%2Fansible-role-harbor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialejandro%2Fansible-role-harbor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialejandro%2Fansible-role-harbor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ialejandro","download_url":"https://codeload.github.com/ialejandro/ansible-role-harbor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialejandro%2Fansible-role-harbor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"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-16T18:34:27.013Z","updated_at":"2026-01-31T11:03:23.880Z","avatar_url":"https://github.com/ialejandro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: Harbor\n\nInstalls and configures [Harbor](https://goharbor.io/), an open-source container image registry, on Linux.\n\n## Requirements\n\n* Ansible 2.10+\n* Docker and Docker Compose installed on the target host\n* Supported platforms:\n  * Amazon Linux\n  * Debian\n  * Ubuntu\n  * Enterprise Linux (RHEL, CentOS, Rocky, Alma)\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml` and `vars/main.yml`).\n\n### Required Variables\n\nThese variables **must** be set — the role will fail if they are not provided:\n\n| Variable | Description |\n|---|---|\n| `harbor_hostname` | The hostname for the Harbor registry (e.g., `registry.example.com`) |\n| `harbor_external_url` | The external URL for Harbor (e.g., `https://registry.example.com`) |\n| `harbor_admin_password` | The password for the Harbor admin user. Use `ansible-vault` to encrypt this value |\n\n### General\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_version_release` | `2.8.2` | The release version of Harbor to install |\n| `harbor_version_config` | `2.8.0` | The configuration version of Harbor |\n| `harbor_installation_dir` | `/etc/harbor` | The directory where Harbor will be installed |\n| `harbor_http_port` | `80` | The HTTP port on which Harbor will be accessible |\n| `harbor_admin_password` | `''` | The password for the default admin user (**required**) |\n| `harbor_data_volume` | `/data` | The volume path for storing Harbor data |\n| `harbor_user` | `root` | The user that will own the Harbor installation |\n| `harbor_run_installer` | `true` | Whether to run the Harbor install script. Set to `false` for testing |\n\n### Storage Service\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_storage_service_cache_layerinfo` | `redis` | Caching layer information service |\n| `harbor_storage_service_delete_enabled` | `true` | Enable the delete operation for Harbor storage |\n| `harbor_storage_service_maintenance_uploadpurging_age` | `168h` | The age of uploaded files before purging |\n| `harbor_storage_service_maintenance_uploadpurging_dryrun` | `false` | Run purging in dry-run mode |\n| `harbor_storage_service_maintenance_uploadpurging_enabled` | `true` | Enable upload purging maintenance |\n| `harbor_storage_service_maintenance_uploadpurging_interval` | `24h` | Interval between purging runs |\n| `harbor_storage_service_redirect_disable` | `false` | Disable redirection in storage service |\n\n#### S3 Storage Configuration\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_storage_service_s3_accesskey` | `''` | Access key for S3 storage |\n| `harbor_storage_service_s3_secretkey` | `''` | Secret key for S3 storage |\n| `harbor_storage_service_s3_bucket` | `''` | S3 bucket name |\n| `harbor_storage_service_s3_region` | `''` | S3 region |\n| `harbor_storage_service_s3_chunksize` | `5242880` | S3 chunk size |\n| `harbor_storage_service_s3_multipartcopychunksize` | `33554432` | S3 multipart copy chunk size |\n| `harbor_storage_service_s3_multipartcopymaxconcurrency` | `100` | S3 multipart copy max concurrency |\n| `harbor_storage_service_s3_multipartcopythresholdsize` | `33554432` | S3 multipart copy threshold size |\n| `harbor_storage_service_s3_secure` | `true` | Enable HTTPS for S3 |\n\n### Job Service\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_jobservice_logger_sweeper_duration` | `10` | The duration for the job service logger sweeper |\n| `harbor_jobservice_max_job_workers` | `1` | Maximum number of job workers |\n\n### Notification\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_notification_webhook_job_http_client_timeout` | `3` | HTTP client timeout for webhook jobs |\n| `harbor_notification_webhook_job_max_retry` | `3` | Maximum retry attempts for webhook jobs |\n\n### Logging\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_log_level` | `info` | Log level for Harbor (`debug`, `info`, `warning`, `error`, `fatal`) |\n| `harbor_log_local_location` | `/var/log/harbor` | Local file system location for Harbor logs |\n| `harbor_log_local_rotate_count` | `10` | Number of rotated log files to keep |\n| `harbor_log_local_rotate_size` | `200M` | Size at which log files are rotated |\n\n### External Database\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_external_database_enabled` | `false` | Enable usage of an external database |\n| `harbor_external_database_harbor_db_name` | `harbor` | Name of the external Harbor database |\n| `harbor_external_database_harbor_host` | `''` | Host address for the external database |\n| `harbor_external_database_harbor_port` | `5432` | Port number for the external database |\n| `harbor_external_database_harbor_username` | `''` | Username for the external database |\n| `harbor_external_database_harbor_password` | `''` | Password for the external database |\n| `harbor_external_database_harbor_ssl_mode` | `disable` | SSL mode (`disable`, `require`, `verify-ca`, `verify-full`) |\n| `harbor_external_database_harbor_max_idle_conns` | `100` | Maximum idle connections |\n| `harbor_external_database_harbor_max_open_conns` | `900` | Maximum open connections |\n\n### External Redis\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_external_redis_enabled` | `false` | Enable usage of an external Redis server |\n| `harbor_external_redis_host` | `''` | Host address for the external Redis server |\n| `harbor_external_redis_jobservice_db_index` | `2` | Database index for job service data |\n| `harbor_external_redis_registry_db_index` | `1` | Database index for registry data |\n\n### Proxy\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_proxy_components` | `['core', 'jobservice', 'trivy']` | Components to use the proxy |\n| `harbor_proxy_http_proxy` | `''` | HTTP proxy server |\n| `harbor_proxy_https_proxy` | `''` | HTTPS proxy server |\n| `harbor_proxy_no_proxy` | `''` | Domains or IPs to exclude from proxying |\n\n### Metrics\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_metric_enabled` | `false` | Enable Prometheus metrics |\n| `harbor_metric_path` | `/metrics` | Metrics endpoint path |\n| `harbor_metric_port` | `9090` | Metrics endpoint port |\n\n### Upload Purging\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_upload_purging_enabled` | `true` | Enable upload purging |\n| `harbor_upload_purging_age` | `168h` | Age of uploads before purging |\n| `harbor_upload_purging_dryrun` | `false` | Run purging in dry-run mode |\n| `harbor_upload_purging_interval` | `24h` | Interval between purging runs |\n\n### Cache\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_cache_enabled` | `true` | Enable caching |\n| `harbor_cache_expire_hours` | `24` | Cache expiration time in hours |\n\n### Custom Properties\n\n| Variable | Default | Description |\n|---|---|---|\n| `harbor_custom_properties` | `{}` | Additional properties merged into the final Harbor configuration |\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n### Minimal\n\n```yaml\n- hosts: all\n  roles:\n    - role: ansible-role-harbor\n      harbor_hostname: \"registry.example.com\"\n      harbor_external_url: \"https://registry.example.com\"\n      harbor_admin_password: \"{{ vault_harbor_admin_password }}\"\n```\n\n### With external database and Redis\n\n```yaml\n- hosts: all\n  roles:\n    - role: ansible-role-harbor\n      harbor_hostname: \"registry.example.com\"\n      harbor_external_url: \"https://registry.example.com\"\n      harbor_admin_password: \"{{ vault_harbor_admin_password }}\"\n      harbor_external_database_enabled: true\n      harbor_external_database_harbor_host: \"db.example.com\"\n      harbor_external_database_harbor_username: \"harbor\"\n      harbor_external_database_harbor_password: \"{{ vault_harbor_db_password }}\"\n      harbor_external_database_harbor_ssl_mode: \"require\"\n      harbor_external_redis_enabled: true\n      harbor_external_redis_host: \"redis.example.com\"\n```\n\n### With S3 storage backend\n\n```yaml\n- hosts: all\n  roles:\n    - role: ansible-role-harbor\n      harbor_hostname: \"registry.example.com\"\n      harbor_external_url: \"https://registry.example.com\"\n      harbor_admin_password: \"{{ vault_harbor_admin_password }}\"\n      harbor_storage_service_s3_accesskey: \"{{ vault_s3_access_key }}\"\n      harbor_storage_service_s3_secretkey: \"{{ vault_s3_secret_key }}\"\n      harbor_storage_service_s3_bucket: \"harbor-registry\"\n      harbor_storage_service_s3_region: \"us-east-1\"\n```\n\n## License\n\nMIT\n\n## Author Information\n\nThis role was created by [ialejandro](https://github.com/ialejandro).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fialejandro%2Fansible-role-harbor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fialejandro%2Fansible-role-harbor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fialejandro%2Fansible-role-harbor/lists"}