{"id":19156043,"url":"https://github.com/markkimsal/brovision","last_synced_at":"2026-04-29T22:02:57.178Z","repository":{"id":66691777,"uuid":"83482964","full_name":"markkimsal/brovision","owner":"markkimsal","description":"Simple, master-less server provisioning with bash (and ssh)","archived":false,"fork":false,"pushed_at":"2017-04-10T14:51:33.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T12:35:50.507Z","etag":null,"topics":["bash","provisioning"],"latest_commit_sha":null,"homepage":"https://igotaprinter.com/blog/poor-mans-provisioning-with-bash.html","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/markkimsal.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":"2017-02-28T21:52:20.000Z","updated_at":"2017-03-02T13:39:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f237270-75ef-4994-9b8d-963019f5f08f","html_url":"https://github.com/markkimsal/brovision","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markkimsal/brovision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fbrovision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fbrovision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fbrovision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fbrovision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markkimsal","download_url":"https://codeload.github.com/markkimsal/brovision/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fbrovision/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32445555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bash","provisioning"],"created_at":"2024-11-09T08:33:02.995Z","updated_at":"2026-04-29T22:02:57.128Z","avatar_url":"https://github.com/markkimsal.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Master-less Server Provisioning with Bash\n=========\nStart provisioning your servers and images without the steep learning curve.\n\n\nStart\n---\nStart by defining a node to be provisioned.\n```\nmkdir -p nodes/myservers/\necho -e \"SSH_HOST=192.168.1.x\nSSH_PORT=22\nSSH_USER=pi\ndeclare -a TASKS=('ping')\n\" \u003e nodes/myservers/raspberry_pi.sh\n```\n\nTest out the server connection with the ping task\n```\n./brovision.sh raspberry_pi\n```\n\nVariables\n---\nVariables defined in your node file are pre-pended to any task being sent to the node.\nIn this way you can use _source_ to arrange your settings and password files.\n\n\n```\nSSH_HOST=192.168.1.x\nSSH_PORT=22\nSSH_USER=pi\n\nD=$(dirname \"${BASH_SOURCE[0]}\")\nsource $D/roles/mysql.sh\nsource $D/roles/nginx.sh\n```\n\nIt is advisable to write all your tasks and source files to use the prefix BRO\\_ for all variable names.\nTrying to automatically determine the variables defined in a bash script is problamatic.  Only transfering variables\nprefixed with BRO\\_ could prove a more reliable method in the future.\n\n\nNode specific tasks\n----\nSometimes you have a script that is not applicable to any other host.  Maybe it has passwords in it.  Maybe it is for a specific architecture that you cannot make generic.  In these cases, you can put the file into a \"tasks/\" folder in your node groups.\n\n\n```\nbrovision.sh\n├── tasks\n│   └── os\n│       └── set-hostname.sh\n├── nodes\n│   ├── MYSERVERS #separate git repo\n│   │    ├── my-rpi.sh\n│   │    └── tasks/\n│   │       └── install-repozytorium.sh\n\n```\n\nIn the above case, install-repozytorium is really only applicable to raspberry-pi devices.  Trying to make a generic repo adding task is not very rewarding.  We can call this task directly in the my-rpi.sh node file:\n\n\n```\n#nodes/MYSERVERS/my-rpi.sh\n\ndeclare -a TASKS=()\nTASKS+=('os/set-hostname.sh') # \u003c-- generic tasks/os/set-hostname.sh\nTASKS+=('install-repozytorium.sh') # \u003c-- first tries nodes/MYSERVERS/tasks/\n```\n\nNotice that we include the file extension \".sh\".  The brovision.sh file will examine any \"tasks/\" folder under the directory which holds the specified node file.  If it cannot find a file there, it seeks to look under tasks/*/*.sh.\n\nBasically:\n  - refer to just the file with .sh extension for custom task files\n  - but, refer to directory or directory/task.sh for generic tasks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkkimsal%2Fbrovision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkkimsal%2Fbrovision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkkimsal%2Fbrovision/lists"}