{"id":16786485,"url":"https://github.com/db0/ansible_collection-hitachi_ops_center","last_synced_at":"2025-03-16T23:23:23.957Z","repository":{"id":145077540,"uuid":"394256090","full_name":"db0/ansible_collection-hitachi_ops_center","owner":"db0","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-09T13:20:41.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T09:33:15.712Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/db0.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":"2021-08-09T10:58:57.000Z","updated_at":"2022-11-06T10:36:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b7916c7-b726-4a18-8063-4c2a77c8424b","html_url":"https://github.com/db0/ansible_collection-hitachi_ops_center","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fansible_collection-hitachi_ops_center","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fansible_collection-hitachi_ops_center/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fansible_collection-hitachi_ops_center/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fansible_collection-hitachi_ops_center/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/db0","download_url":"https://codeload.github.com/db0/ansible_collection-hitachi_ops_center/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945716,"owners_count":20372920,"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":[],"created_at":"2024-10-13T08:12:23.303Z","updated_at":"2025-03-16T23:23:23.920Z","avatar_url":"https://github.com/db0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection: Db0 Hitachi OPS Center\n\n\nThis collection contains roles which help perform operations using the Hitachi OPS Center using the Configuration Manager REST API\n\nCheck the documentation included for each role for usage details.\n\nThis collection was created to help me perform operations in my previous job's setup. \nSome code, particularly in the filter plugins, is expected to be extended to handle your particular business' setup.\n\n## Roles\n\n### cached_uri\n\nThis role will retrieve and cache a REST API result from the specified URI, using the ansible uri module, then store it in a predefined location. If the specified URI has already been cached and within its TTL, it will use the cached version.\n\n### job_uri\n\nThis role will initiate a REST API call which is expected to start and return a job result uri. Then it will poll that URI a specified number of times, until the operation is completed, then return the result.\n\n### flush_cache\n\nThis role will flush all or just part of the cache created by the cached_uri role.\n\n### keep_alive\n\nThis role will keep alive a logged-in session against the configuration manager until the PID of the current\nansible-playbook execution finishes. This ensures that during long operations working on a pair of arrays in tandem,\na slow API response in one of the arrays will not cause the playbook to abort because the session on the other array \nexpired after 5 minutes\n\n### lock_resource_groups\n\nThis role will lock the resource groups where the current user has admin access. It can also be used to simply check for existing locks only.\n\n### lookup_hostgroups\n\nThis role will go through all arrays defined in the hitachi_ops_center and look for any hostgroups which match the given name.\n\n## Example\n\nHere's a sample playbook using many roles of this collection to retrieve information about hitachi arrays\n\n```\n---\n\n- hosts: all\n  collections:\n    - db0.hitachi_ops_center\n\n  tasks:\n\n  - name: Discover arrays in which host/cluster is zoned\n    include_role:\n      name: lookup_hostgroups\n\n  - debug:\n      var: arrays_zoned\n```\n\nThen execute it like so:\n\n```\nansible-playbook -i storageadmin.example.com, add-standard-lun.yml -e HUSER=${HUSER} -e HPASS=${HPASS} -e NAME=clustername\n```\n\nYou can then use the information stored in arrays_zoned to do further tasks in hitachi arrays, such as adding LUNS etc. You can use the `job_uri` role for performing operations","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb0%2Fansible_collection-hitachi_ops_center","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdb0%2Fansible_collection-hitachi_ops_center","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb0%2Fansible_collection-hitachi_ops_center/lists"}