{"id":24131825,"url":"https://github.com/selcukcosan/f5-bigip_as3_declaration","last_synced_at":"2025-07-13T04:36:59.635Z","repository":{"id":245114231,"uuid":"817251382","full_name":"selcukcosan/f5-bigip_as3_declaration","owner":"selcukcosan","description":"F5 BIG-IP AS3 Declaration to make changes via Ansible","archived":false,"fork":false,"pushed_at":"2024-06-19T13:05:31.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T21:36:13.113Z","etag":null,"topics":["ansible","ansible-playbook","as3","as3yaml","declarative","f5","f5-bigip","f5networks"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selcukcosan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-19T10:18:55.000Z","updated_at":"2024-06-19T13:13:44.000Z","dependencies_parsed_at":"2024-06-19T22:58:10.335Z","dependency_job_id":null,"html_url":"https://github.com/selcukcosan/f5-bigip_as3_declaration","commit_stats":null,"previous_names":["selcukcosan/f5-bigip_as3_declaration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_as3_declaration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_as3_declaration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_as3_declaration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_as3_declaration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selcukcosan","download_url":"https://codeload.github.com/selcukcosan/f5-bigip_as3_declaration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241333085,"owners_count":19945733,"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","ansible-playbook","as3","as3yaml","declarative","f5","f5-bigip","f5networks"],"created_at":"2025-01-11T21:31:33.165Z","updated_at":"2025-03-01T07:26:48.739Z","avatar_url":"https://github.com/selcukcosan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# f5-bigip_as3_declaration\n\nThis Ansible script writes AS3 Declaration json file into F5 BIG-IP devices via REST. The script uses the official f5networks.f5_bigip Ansible modules on [https://galaxy.ansible.com/ui/repo/published/f5networks/f5_modules/](https://galaxy.ansible.com/ui/repo/published/f5networks/f5_bigip/)\n\nThe inventory yaml format is simple as below.\n\n\n```yml\n---\nall:\n  children:\n    all_f5:\n      hosts:\n        bigip1:\n          inventory_network_os: f5.bigip\n          inventory_host: 192.168.1.245\n          inventory_port: 443\n          inventory_user: admin\n          inventory_pass: password\n        bigip2:\n          inventory_network_os: f5.bigip\n          inventory_host: 192.168.1.246\n          inventory_port: 443\n          inventory_user: admin\n          inventory_pass: password\n        bigip11:\n          inventory_network_os: f5.bigip\n          inventory_host: 192.168.1.231\n          inventory_port: 443\n          inventory_user: admin\n          inventory_pass: password\n```\n\n## Prerequisite\nF5 Ansible Declarative Modules must be installed before running the script.\n```bash\nansible-galaxy collection install f5networks.f5_bigip==3.2.2\n```\n\n## Usage:\n```bash\n\nANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -vvvv --vault-password-file vault_pass.yaml -i inventory-vault.yaml bigip11_as3_basics.yaml --extra-vars=\"bigip=bigip11\"\n```\n\n## Files\n- bigip11_as3_basics.yaml \u003e\u003e Ansible script file\n- declarations/bigip11_as3.json \u003e\u003e AS3 Declaration File\n- vault_pass.yaml \u003e\u003e Inventory vault password information\n- inventory-vault.yaml \u003e\u003e Inventory vault file encrypted by \"Inventory vault password\"\n\n## Variables\n- `bigip` variable shows which F5 device will be connected.The value can be \"bigip1\", \"bigip11\" or \"all_f5\" as per the example inventory file above.\n\n## Deploying AS3 Changes in bigip11_as3_basics.yaml\n\n- name: 01-Deploy AS3 Virtual Servers \u003e\u003e this task loads declarations/bigip11_as3.json file and create Partition, Folder, Virtual Servers, Pools and nodes etc.\n\n```yml\n---\n- name: PLAY - AS3\n  hosts: \"{{ bigip }}\"\n  connection: httpapi\n  vars:\n    ansible_host: \"{{ inventory_host }}\"\n    ansible_httpapi_port: \"{{ inventory_port }}\"\n    ansible_user: \"{{ inventory_user }}\"\n    ansible_httpapi_password: \"{{ inventory_pass }}\"\n    ansible_network_os: f5networks.f5_bigip.bigip\n    ansible_httpapi_use_ssl: yes\n    ansible_httpapi_validate_certs: no\n    ansible_command_timeout: 1800\n    ansible_httpapi_use_proxy: false\n    f5_telemetry: false      \n  gather_facts: false\n  tasks:\n    - name: 01-Deploy AS3 Virtual Servers\n      f5networks.f5_bigip.bigip_as3_deploy:\n        content: \"{{ lookup('file', 'declarations/bigip11_as3.json') }}\"\n        #tenant: \"Partition-1\"\n        state: present\n        timeout: 300\n\n```\n\n## Removing AS3 Changes in bigip11_as3_basics.yaml\nIf you want to remove the declaration from the F5, change the task as below and run it again. This time all configurations related with this AS3 will be deleted.\n\n```yml\n  tasks:\n    - name: 01-Deploy AS3 Virtual Servers\n      f5networks.f5_bigip.bigip_as3_deploy:\n        content: \"{{ lookup('file', 'declarations/bigip11_as3.json') }}\"\n        tenant: \"Partition-1\"\n        state: absent\n        timeout: 300\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcukcosan%2Ff5-bigip_as3_declaration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselcukcosan%2Ff5-bigip_as3_declaration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcukcosan%2Ff5-bigip_as3_declaration/lists"}