{"id":34243581,"url":"https://github.com/opensvc/ansible-collection-osvc","last_synced_at":"2025-12-16T05:04:13.934Z","repository":{"id":50473355,"uuid":"250474062","full_name":"opensvc/ansible-collection-osvc","owner":"opensvc","description":"Ansible Collection Development Repository","archived":false,"fork":false,"pushed_at":"2025-10-20T12:47:46.000Z","size":237,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-20T14:44:50.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/opensvc.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-27T07:57:59.000Z","updated_at":"2025-10-20T12:47:50.000Z","dependencies_parsed_at":"2025-01-28T17:31:44.500Z","dependency_job_id":"50e23830-6260-402d-9700-a284a69e5f33","html_url":"https://github.com/opensvc/ansible-collection-osvc","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/opensvc/ansible-collection-osvc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensvc%2Fansible-collection-osvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensvc%2Fansible-collection-osvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensvc%2Fansible-collection-osvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensvc%2Fansible-collection-osvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensvc","download_url":"https://codeload.github.com/opensvc/ansible-collection-osvc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensvc%2Fansible-collection-osvc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27759615,"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-12-16T02:00:10.477Z","response_time":57,"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":"2025-12-16T05:04:12.342Z","updated_at":"2025-12-16T05:04:13.922Z","avatar_url":"https://github.com/opensvc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Ansible Collection Development Repository\n\n\n[OpenSVC](https://www.opensvc.com/) supports Ansible for cluster deployment and configuration. This repository includes an Ansible collection with multiple roles and example playbooks, allowing users to easilly build OpenSVC clusters. It is also organised to develop and contribute to this project. Please refer to [Getting Started](#getting-started) section of this readme.\n\n## Ansible Collections\n\nPlease refer to [Ansible Collections Documentation](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#developing-collections) for any questions related to this new way of delivering Ansible contents (introduced by ansible version `2.9.0`)\n\n## Getting Started\n\nThere are multiple ways of using the collection, they are described below\n\n### Prerequisites\n\nThis repository requires some products to be installed:\n\n__Collection usage__\n- python interpreter `2.7` and `3.6+`\n- ansible \u003e= `2.11.0`\n- docker\n\n## Ansible version compatibility\n\nThis collection has been tested against the following Ansible versions: \u003e=2.11, 2.13, 2.14, 2.15.\n\n----\n\n\n###  Option 1 : Using [Ansible Galaxy](https://galaxy.ansible.com/) and `ansible-galaxy` to install the collection\n\n```shell\n$ ansible-galaxy collection install opensvc.cluster\nProcess install dependency map\nStarting collection install process\nInstalling 'opensvc.cluster:0.0.1' to '~/.ansible/collections/ansible_collections/opensvc/cluster'\n```\n\n----\n\n\n### Option 2 : Installing the collection from the git repository\n\nYou can git clone this repository, and build yourself the collection, to finally install it\n\n__Git clone the repo__\n\n```shell\nuser@node:~/dev$ git clone https://github.com/opensvc/ansible-collection-osvc.git\n```\n\n__Install the collection__\n\n```shell\nuser@node:~/dev$ cd ansible-collection-osvc\nuser@node:~/dev/ansible-collection-osvc$ ansible-galaxy collection build --force ansible_collections/opensvc/cluster\nuser@node:~/dev/ansible-collection-osvc$ ansible-galaxy collection install opensvc-cluster-\u003cVERSION\u003e.tar.gz\n```\n\nSome example playbooks are available in the `examples` folder. After updating the `inventory` file to reflect your environment, you can run a playbook with the command below:\n\n```shell\n$ cd examples\n$ ansible-playbook -i inventory playbook.yml\n```\n\nPlease refer to [OpenSVC Galaxy Documentation](https://galaxy.ansible.com/opensvc) for more detailed usages of the collection.\n\n----\n\n\n### Option 3 : Testing/Contributing to the collection\n\n__Git clone the repo__\n\n```shell\nuser@node:~/dev$ git clone https://github.com/opensvc/ansible-collection-osvc.git\n```\n\nYou can contribute to this collection by using the development environment:\n\n1. Implement changes, patches, to the collection structure `ansible-collection-osvc/ansible_collections/*`. You don't have to commit your changes for testing purposes.\n2. Build the docker image\n  * install all prerequisites\n  * embedds the current collection with your changes\n    ```shell\n    user@node:~/dev$ cd ansible-collection-osvc\n    user@node:~/dev/ansible-collection-osvc$ docker build -t osvccol:test .\n    ```\n3. Spawn a docker container using the new image, and start testing your changes using the bind mounted `examples` directory\n    ```shell\n    user@node:~/dev/ansible-collection-osvc$ docker run --rm -v $HOME/dev/ansible-collection-osvc/examples:/examples -it osvccol:stable /bin/sh\n    /examples # \n    ```\n4. Update `inventory` and `ssh.private.key` files\n    ```shell\n    /examples # ls -l\n    total 40\n    -rw-r--r--    1 1000     1000           140 Mar 25 16:42 ansible.cfg\n    -rw-r--r--    1 1000     1000           226 Mar 25 16:08 inventory\n    -rw-r--r--    1 1000     1000           233 Mar 25 16:36 playbook-provision-cluster.yml\n    -rw-r--r--    1 1000     1000           151 Mar 23 11:17 playbook-unprovision-cluster.yml\n    -rw-r--r--    1 1000     1000           152 Mar 23 11:23 playbook-unprovision-services.yml\n    -rwx------    1 1000     1000          3243 Mar 23 09:23 ssh.private.key\n    ```\n    **Note:** You must create the `ssh.private.key` file with your personal private key, to make ssh connection work fine.\n\n    ```shell\n    /examples # cat inventory \n    [clusternodes]\n    demo1.acme.com ansible_host=\"1.1.1.1\" ansible_ssh_private_key_file=\"ssh.private.key\"\n    demo2.acme.com ansible_host=\"2.2.2.2\" ansible_ssh_private_key_file=\"ssh.private.key\"\n    \n    [webservers]\n    web1.acme.com\n    web2.acme.com\n    \n    [dbservers]\n    db1.acme.com\n    db2.acme.com\n    ```\n5. Run a playbook to provision a cluster using members of the `clusternodes` group\n    ```shell\n    /examples # ansible-playbook -i inventory playbook-provision-cluster.yml --limit clusternodes\n    ```\n\nIf your changes are ok, and you want to share them with the community, then you can submit a pull request.\n\nIf you need to rework your changes, just follow those steps :\n\n1. Exit the docker container with `exit` or `CTRL+d`\n2. Fix your code\n3. Update the docker image\n    ```shell\n    user@node:~/dev/ansible-collection-osvc$ docker build -t osvccol:test .\n    ```\n4. Spawn a new docker container\n    ```shell\n    user@node:~/dev/ansible-collection-osvc$ docker run --rm -v $HOME/dev/ansible-collection-osvc/examples:/examples -it osvccol:stable /bin/sh\n    ```\n5. Repeat your tests\n    ```shell\n    /examples # ansible-playbook -i inventory playbook-provision-cluster.yml --limit clusternodes\n    ```\n\n----\n\n### Note\n\nThe `Dockerfile` ends with a call to an entrypoint `docker-entrypoint.sh` which by default run a syntax check and lint every playbook found in the `examples` directory.\n\n```shell\nuser@node:~/dev/ansible-collection-osvc$ docker run --rm -v $PWD/examples:/examples -it osvccol:test\n\n=\u003e Start syntax checking \u0026 linting for playbook playbook-provision-cluster-with-relay-heartbeat.yml\n\nplaybook: playbook-provision-cluster-with-relay-heartbeat.yml\nExamining playbook-provision-cluster-with-relay-heartbeat.yml of type playbook\n=\u003e End of syntax checking \u0026 linting for playbook playbook-provision-cluster-with-relay-heartbeat.yml\n\n=\u003e Start syntax checking \u0026 linting for playbook playbook-provision-cluster.yml\n\nplaybook: playbook-provision-cluster.yml\nExamining playbook-provision-cluster.yml of type playbook\n=\u003e End of syntax checking \u0026 linting for playbook playbook-provision-cluster.yml\n\n=\u003e Start syntax checking \u0026 linting for playbook playbook-unprovision-cluster.yml\n\nplaybook: playbook-unprovision-cluster.yml\nExamining playbook-unprovision-cluster.yml of type playbook\n=\u003e End of syntax checking \u0026 linting for playbook playbook-unprovision-cluster.yml\n\n=\u003e Start syntax checking \u0026 linting for playbook playbook-unprovision-services.yml\n\nplaybook: playbook-unprovision-services.yml\nExamining playbook-unprovision-services.yml of type playbook\n=\u003e End of syntax checking \u0026 linting for playbook playbook-unprovision-services.yml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensvc%2Fansible-collection-osvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensvc%2Fansible-collection-osvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensvc%2Fansible-collection-osvc/lists"}