{"id":51590727,"url":"https://github.com/hellqvio86/ansible-collection-unifi","last_synced_at":"2026-07-11T14:30:52.628Z","repository":{"id":357850198,"uuid":"1221402426","full_name":"hellqvio86/ansible-collection-unifi","owner":"hellqvio86","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-21T14:02:18.000Z","size":425,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T14:19:27.017Z","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/hellqvio86.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"agents.md","dco":null,"cla":null}},"created_at":"2026-04-26T06:43:15.000Z","updated_at":"2026-06-21T12:15:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hellqvio86/ansible-collection-unifi","commit_stats":null,"previous_names":["hellqvio86/ansible-collection-unifi"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/hellqvio86/ansible-collection-unifi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Fansible-collection-unifi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Fansible-collection-unifi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Fansible-collection-unifi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Fansible-collection-unifi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellqvio86","download_url":"https://codeload.github.com/hellqvio86/ansible-collection-unifi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Fansible-collection-unifi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35365808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"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":[],"created_at":"2026-07-11T14:30:50.284Z","updated_at":"2026-07-11T14:30:52.618Z","avatar_url":"https://github.com/hellqvio86.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UniFi Ansible Collection\n\n[![CI](https://github.com/hellqvio86/ansible-collection-unifi/actions/workflows/ci.yml/badge.svg)](https://github.com/hellqvio86/ansible-collection-unifi/actions/workflows/ci.yml)\n[![Tests](https://github.com/hellqvio86/ansible-collection-unifi/actions/workflows/ci.yml/badge.svg?job=test)](https://github.com/hellqvio86/ansible-collection-unifi/actions/workflows/ci.yml)\n[![Ansible Galaxy](https://img.shields.io/ansible/collection/v/hellqvio86/unifi?logo=ansible\u0026logoColor=black\u0026label=Ansible%20Galaxy)](https://galaxy.ansible.com/hellqvio86/unifi)\n\n\u003e [!CAUTION]\n\u003e **Alpha Status**: This collection is currently in early alpha. APIs and module arguments are subject to breaking changes. Use with caution in production environments.\n\n\u003e [!IMPORTANT]\n\u003e **Disclaimer**: This project is an independent open-source initiative and is **not** affiliated with, sponsored by, or endorsed by Ubiquiti Inc. UniFi and Ubiquiti are trademarks of Ubiquiti Inc.\n\nAn Ansible collection for managing UniFi Network (v8.x+) and UniFi OS (v3.x+) with a focus on modern API-driven infrastructure.\n\n## Included Modules\n\n### Network Management\n- `hellqvio86.unifi.unifi_wlan`: Manage WiFi networks and passphrases.\n- `hellqvio86.unifi.unifi_port_profile`: Manage switch port profiles (VLAN, PoE, speed).\n- `hellqvio86.unifi.unifi_switch_profile`: Manage logical switch profiles.\n- `hellqvio86.unifi.unifi_switch_profile_assignment`: Assign profiles to specific switches.\n\n### Firewall \u0026 Security\n- `hellqvio86.unifi.unifi_firewall_policy`: Manage modern firewall rules (v2 API).\n- `hellqvio86.unifi.unifi_firewall_zone`: Manage firewall zones (v2 API).\n- `hellqvio86.unifi.unifi_firewall_group`: Manage IP and Port groups (REST API).\n\n### System \u0026 Settings\n- `hellqvio86.unifi.unifi_rsyslog`: Configure remote syslog (Activity Logging) settings.\n- `hellqvio86.unifi.unifi_ssh_key`: Manage system-level SSH keys for persistent access.\n- `hellqvio86.unifi.unifi_ssl_config`: Deploy SSL certificates via modulated SSH.\n- `hellqvio86.unifi.unifi_user_certificate`: Manage user-facing certificates via UniFi OS API.\n- `hellqvio86.unifi.unifi_info`: Gather comprehensive infrastructure state.\n\n## Installation\n\nInstall via Ansible Galaxy:\n```bash\nansible-galaxy collection install hellqvio86.unifi\n```\n\nOr include it in your `requirements.yml`:\n```yaml\ncollections:\n  - name: hellqvio86.unifi\n    version: 0.0.12\n```\n\n## Getting Started: Dump Your Current State\n\nStart by dumping your existing UniFi configuration. This gives you a reference of everything currently on your controller:\n\n```bash\nexport UNIFI_HOST=\"192.0.2.1\"\nexport UNIFI_USERNAME=\"admin\"\nexport UNIFI_PASSWORD=\"password\"\n\nansible-playbook playbooks/unifi_dump_all.yml\n```\n\nThis generates a `unifi_dump/` directory with one YAML file per category (wifi, networks, firewall, DHCP, etc.). Use these files as a reference to build your playbooks and group_vars.\n\n**Onboarding workflow:**\n1. **Dump** your current state with `playbooks/unifi_dump_all.yml`\n2. **Review** the dumped YAML files to understand your setup\n3. **Write** playbooks using the modules listed below\n4. **Apply** changes gradually with ansible-pull or a management playbook\n\n## Authentication (The Login Step)\n\nTo avoid cluttering your tasks, use `module_defaults` to define your credentials once. This acts as your **\"Login Step\"**.\n\n```yaml\n- name: Manage UniFi\n  hosts: localhost\n  module_defaults:\n    group/hellqvio86.unifi.unifi:\n      host: \"192.0.2.1\"\n      username: \"admin\"\n      password: \"password\"\n```\n\n## Usage: WiFi \u0026 Networks\n\n```yaml\n- name: Ensure Home WiFi exists\n  hellqvio86.unifi.unifi_wlan:\n    name: \"HomeWiFi\"\n    passphrase: \"securepassword\"\n    state: present\n```\n\n## Usage: Switching\n\n```yaml\n- name: Create IoT port profile\n  hellqvio86.unifi.unifi_port_profile:\n    name: \"IoT Ports\"\n    native_network_name: \"IoT\"\n    tagged_network_names: [\"Camera\"]\n\n- name: Assign profile to switch\n  hellqvio86.unifi.unifi_switch_profile_assignment:\n    switch_name: \"Main-Switch\"\n    profile_name: \"IoT Ports\"\n```\n\n## Usage: Firewall (Modern Policy Engine)\n\n```yaml\n- name: Create Internal Zone\n  hellqvio86.unifi.unifi_firewall_zone:\n    name: \"Internal\"\n    networks: [\"Default\", \"IoT\"]\n\n- name: Block IoT to Gateway\n  hellqvio86.unifi.unifi_firewall_policy:\n    name: \"Block IoT to Gateway\"\n    action: BLOCK\n    source: { zone: \"Internal\" }\n    destination: { zone: \"External\" }\n```\n\n## Usage: System \u0026 Security\n\n```yaml\n- name: Configure activity logging\n  hellqvio86.unifi.unifi_rsyslog:\n    ip: \"192.0.2.50\"\n    enabled: true\n\n- name: Ensure admin SSH keys are present\n  hellqvio86.unifi.unifi_ssh_key:\n    keys: [\"ssh-rsa AAAAB3Nza...\"]\n```\n\n## Usage: Information Gathering\n\n```yaml\n- name: Gather all live state\n  hellqvio86.unifi.unifi_info:\n    gather_subset: [ wifi, firewall_groups ]\n  register: unifi_state\n```\n\n## Environment Variables\n\nYou can also skip credentials entirely by setting `UNIFI_HOST`, `UNIFI_USERNAME`, and `UNIFI_PASSWORD`.\n\n## Development \u0026 Building\n\nThis project uses a `Makefile` to handle local development, testing, and packaging for Ansible Galaxy. Here are the available commands:\n\n- `make venv`: Create a virtual environment and install dependencies.\n- `make test`: Run unit tests using `pytest`.\n- `make lint`: Run `ruff` and `ansible-lint` to check code quality.\n- `make format`: Auto-format code using `ruff`.\n- `make build`: Build the Ansible collection tarball (`.tar.gz`) for release.\n- `make publish`: Build and publish the collection to Ansible Galaxy.\n\n**Publishing a new release:**\nTo publish a release, you must provide your Ansible Galaxy API key:\n```bash\nmake publish GALAXY_API_KEY=\"your_api_key_here\" [VERSION=0.0.4]\n```\n\n## License\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellqvio86%2Fansible-collection-unifi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellqvio86%2Fansible-collection-unifi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellqvio86%2Fansible-collection-unifi/lists"}