{"id":20263590,"url":"https://github.com/springerpe/ansible-boshrelease","last_synced_at":"2025-10-12T00:43:44.405Z","repository":{"id":54413665,"uuid":"73391635","full_name":"SpringerPE/ansible-boshrelease","owner":"SpringerPE","description":"BOSH and ansible integration to run ansible playbooks and roles with bosh","archived":false,"fork":false,"pushed_at":"2023-08-01T23:16:14.000Z","size":91,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-29T03:39:57.497Z","etag":null,"topics":["ansible","bosh","bosh-release"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpringerPE.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2016-11-10T14:52:52.000Z","updated_at":"2021-02-19T12:47:48.000Z","dependencies_parsed_at":"2024-11-14T11:37:02.476Z","dependency_job_id":"54a24e20-8a9a-4e73-b128-0cb1bd6e1da2","html_url":"https://github.com/SpringerPE/ansible-boshrelease","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/SpringerPE/ansible-boshrelease","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fansible-boshrelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fansible-boshrelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fansible-boshrelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fansible-boshrelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpringerPE","download_url":"https://codeload.github.com/SpringerPE/ansible-boshrelease/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fansible-boshrelease/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009510,"owners_count":26084609,"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-10-11T02:00:06.511Z","response_time":55,"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":["ansible","bosh","bosh-release"],"created_at":"2024-11-14T11:35:38.418Z","updated_at":"2025-10-12T00:43:44.388Z","avatar_url":"https://github.com/SpringerPE.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible release for BOSH\n\nMerging the power of Ansible orchestration with the awesome software lifecycle management of BOSH\n\nApart of providing ansible binaries this release offers a way to trigger actions \nwhich will run add-on ansible releases on nodes. The idea is be able to run\nansible playbooks every time that a new instance is deployed by making use \nof BOSH hooks to extend its functionality to Ansible to talk with external\ncomponents of a deployment like LB, DNSs, etc.\n\nHave a look at the [ansible-bigiplb-boshrelease](https://github.com/SpringerPE/ansible-bigiplb-boshrelease)\nto see an example of an add-on which will register the instances of a deployment \non the F5 load balancer pool when they are deployed.\n\n\n# Implementation\n\nThis Ansible-release defines four jobs:\n\n* **ansible**: to provide a way to run Ansible in a deployment via the entrypoint `/var/vcap/jobs/ansible/bin/run`\n* **ansible-hooks**: to automatically trigger playbooks from other add-on releases.\n* **ansible-distclean**: do define errands from add-on releases which will perform clean-up actions for the deployment.\n* **ansible-deploy**: do define errands from add-on releases which will perform additional deploy actions for the deployment.\n\nIn order to trigger playbooks, the *ansible-hooks* jobs implement the [BOSH lifecycle](https://bosh.io/docs/job-lifecycle.html)\nentrypoints: `pre-start`, `post-start`, `post-deploy` and `drain` to call ansible \nplaybooks available from other releases/jobs. *ansible-disclean* and *ansible-deploy*\nare errands jobs to trigger playbooks which run actions outside the vms of a \ndeployment to manage (delete/deploy) external resources.\n\n*ansible* job can also run as a errand by defining the parameters of the *spec*. But\nthe important functionality is done by the *ansible-* * jobs which will look for\nplaybooks from other jobs folder's (`/var/vcap/\u003cjob\u003e/ansible/`) by predefined\nfilename patterns.\n\nAll these jobs accepts a parameter (`ansible.env`) in the manifest to setup\nenviroment variables for ansible (or inventory script). Also, [bosh-inventory](https://github.com/SpringerPE/bosh-ansible-inventory)\nprogram is already included in the release, so you Ansible can use the\ninventory feature to query Bosh Director about the VMs of a deployment.\n\nCurrently the Director does not run `post-deploy` by default. Use \n`director.enable_post_deploy: true` property in Bosh manifest to enable \nrunning those scripts.\n\n\n## ansible-hooks\n\nIt provides a way to define and run a set of playbooks of an add-on release\njob, allowing you to define specific playbooks to run on bootstrap nodes \n(for master/slave setup) or non-bootstrap nodes. The interface which an \nadd-on has to implement in order to be called is defined by the names of the \nplaybooks on the `ansible` folder:\n\n* `*pre-bootstrap.yml`: Will run only on the bootstrap node.\n* `*pre-nobootstrap.yml`: Will run only on the non-bootstrap nodes.\n* `*pre-start.yml`: Will run only on all nodes after the `*pre-bootstrap.yml` or `*pre-nobootstrap.yml` playbooks.\n\nThen BOSH Director starts the jobs assigned to each the instance using monit.\n\n* `*post-bootstrap.yml`: Will run only on the bootstrap node after its jobs are running.\n* `*post-nobootstrap.yml`: Will run only on the non-bootstrap nodes after its jobs are running.\n* `*post-start.yml`: Will run only on all nodes after the `*post-bootstrap.yml` or `*post-nobootstrap.yml` playbooks.\n\nBosh Director waits until all post-start scripts are finished and then these playbooks will be launched\n\n* `*postdeploy-bootstrap.yml`: Will run only on the bootstrap node after all nodes have run all post-start playbooks.\n* `*postdeploy-nobootstrap.yml`: Will run only on the non-bootstrap nodes after all nodes have run all post-start-playbooks. \n* `*postdeploy.yml`: Will run only on all nodes after the `*postdeploy-bootstrap.yml` or `*postdeploy-nobootstrap.yml` playbooks.\n\n\nWhen a node leaves the deployment, bosh director will trigger `*dran.yml` playbooks.\n\nPlaybooks from jobs of add-on releases are executed lexically ordered, for example, this\ncould be a list for `*drain.yml`: `jobs/zz/ansible/00-drain.yml`, `jobs/bb/ansible/10-drain.yml`, `jobs/aa/ansible/99-drain.yml` \n\n\n## ansible-distclean\n\nPlaybooks will be executed as errand jobs within the deployment. The idea is \nimplement a way to clean up all the external resources used in a deployment.\nThey have to provide an `*distclean.yml` playbook which will be launched by the\nerrand.\n\n\n## ansible-deploy\n\nThe playbooks will be executed also as errand jobs within the deployment. The \nidea is implement a way to deploy the external resources (not managed by bosh)\nused in a deployment. They have to provide an `*deploy.yml` playbook which will\nbe launched by the errand.\n\n\n# Development\n\nAfter cloning this repository, run:\n\n```\n./bosh_prepare\n```\n\nIt will download all sources specified in the spec file (commented out) of each job, then you\ncan create the release with:\n```\n./bosh_final_release\n```\n\nand upload to BOSH director:\n\n```\nbosh upload release\n```\n\n\n# Author\n\nSpringer Nature Platform Engineering, Jose Riguera Lopez (jose.riguera@springer.com)\n\nCopyright 2017 Springer Nature\n\n\n\n# License\n\nApache 2.0 License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fansible-boshrelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringerpe%2Fansible-boshrelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fansible-boshrelease/lists"}