{"id":15151588,"url":"https://github.com/yuji-k64613/shellsible","last_synced_at":"2026-02-01T01:04:33.663Z","repository":{"id":253064079,"uuid":"842215177","full_name":"yuji-k64613/shellsible","owner":"yuji-k64613","description":"Shellsible is a simple IT automation system inspired by Ansible.","archived":false,"fork":false,"pushed_at":"2024-08-16T08:05:12.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T11:20:57.757Z","etag":null,"topics":["ansible","automation","best-practices","devops","linux","shell-script","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuji-k64613.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":"2024-08-13T22:56:00.000Z","updated_at":"2024-08-16T08:05:15.000Z","dependencies_parsed_at":"2024-08-16T09:28:03.158Z","dependency_job_id":null,"html_url":"https://github.com/yuji-k64613/shellsible","commit_stats":null,"previous_names":["yuji-k64613/shellsible"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuji-k64613/shellsible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuji-k64613%2Fshellsible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuji-k64613%2Fshellsible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuji-k64613%2Fshellsible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuji-k64613%2Fshellsible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuji-k64613","download_url":"https://codeload.github.com/yuji-k64613/shellsible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuji-k64613%2Fshellsible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28963196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T00:42:38.011Z","status":"ssl_error","status_checked_at":"2026-02-01T00:42:35.920Z","response_time":128,"last_error":"SSL_read: 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":["ansible","automation","best-practices","devops","linux","shell-script","tutorial"],"created_at":"2024-09-26T15:04:26.383Z","updated_at":"2026-02-01T01:04:33.647Z","avatar_url":"https://github.com/yuji-k64613.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shellsible\nShellsible is a simple IT automation system inspired by [Ansible](https://www.ansible.com/).\n* Partial Ansible alternative\n* Automation technology using shell scripting\n* DevOps tools\n\n## Design Principles\n* Configured mainly with shell scripts.\n* No additional software installation required.\n* Emphasize \"[Convention over configuration](https://en.wikipedia.org/wiki/Convention_over_configuration)\" according to Ansible's \"[Best Practices](https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#best-practices\n)\"\n\n## Advantages over Ansible\n* No need to install additional software.\n* Shell scripts can be used as configuration files.\n* Control statements like \"if\" and \"while\" are easily expressed using shell scripts.\n\n## Install Shellsible\n\nSee [Tutorial](#install-shellsible-1).\n\n## Tutorial\n\nThis step-by-step tutorial will give you a basic understanding of how to use Shellsible.\nTo keep the tutorial simple and easy to follow, it demonstrates how to manage the local host(127.0.0.1) as the target with Shellsible, rather than a remote host.\n\n### Premise\n\n* You have some understanding of how to use Ansible.\n  * If not, you can learn and practice Ansible [here](https://github.com/yuji-k64613/ansible_tutorial).\n* You prepare Linux.\n\n### Directory Tree\nThis tutorial uses the following directories.\n\n```\n/tmp\n├── playbook\n├── repo\n├── target\n```\n* playbook: Configuration files.\n* repo: Source code for Shellsible.\n* target: Remote host's directories.\n\n### Make Directories\nType out the following.\n```\nmkdir /tmp/playbook\nmkdir /tmp/repo\nmkdir /tmp/target\n```\n\n### Install Shellsible\nType out the following.\n```\ncd /tmp/repo\ngit clone https://github.com/yuji-k64613/shellsible\nPATH=\"${PATH}:/tmp/repo/shellsible/bin\"\n```\n\n### Test SSH Login\nConfirm whether you can log in to the local host as the root user.\n```\nssh root@127.0.0.1\n```\n\n### Make Initial Playbook\nType out the following.\n```\ncd /tmp/playbook\nshellsible-init.sh -g mygroup -r sample -h host1\n```\n\n* -g: group\n* -r: role\n* -h: target host\n\nAs a result of running \"shellsible-init.sh\", you can see the following output.\n\n```\n.\n├── group_vars\n│     ├── all.sh\n│     ├── mygroup.sh\n├── host_vars\n│     ├── host1.sh\n├── roles\n│     ├── sample\n│           ├── tasks\n│           │     ├── main.sh\n│           ├── files\n│           ├── vars\n│                 ├── main.sh\n├── inventory.conf\n├── mygroup.conf\n```\n\n### Confirm Inventory\nType out the following.\n```\ncat inventory.conf\n```\n\nYou can see which host you will connect to, as well as the user and password.\nYou should change the values of variables according to your environment.\n```\n[mygroup]\nhost1 shellsible_host=127.0.0.1 shellsible_user=root shellsible_password=vagrant\n```\n\n### Confirm Group\nType out the following.\n```\ncat mygroup.conf\n```\n\nYou can see which roles the group executes.\n```\nsample\n```\n\n### Confirm Tasks\nType out the following.\n```\ncat roles/sample/tasks/main.sh\n```\n\nYou can see which tasks the \"sample\" roles execute and how to use the \"debug\" module.\n```\n_debug \\\n    msg=\"hello, world!\"\n```\n\n### Execute Playbook\nType out the following.\n```\nshellsible-playbook.sh mygroup\n```\n\nYou can confirm the result of the playbook.\n```\n2024/08/14 01:38:35 INFO  [mygroup,host1,sample,debug] hello, world!\n```\n\n### Define Variable\nType out the following to define the variable \"MESSAGE\".\n```\ncat \u003c\u003c EOF \u003e group_vars/all.sh \nMESSAGE=\"hello, world!\"\nEOF\n```\n\nType out the following to use the variable \"MESSAGE\".\n```\ncat \u003c\u003c \"EOF\" \u003e roles/sample/tasks/main.sh\n_debug \\\n    msg=\"${MESSAGE}\"\nEOF\n```\n\nType out the following to execute the playbook.\n```\nshellsible-playbook.sh mygroup\n```\n\nYou can confirm the result of the playbook just like the previous one.\n```\n2024/08/14 01:47:00 INFO  [mygroup,host1,sample,debug] hello, world!\n```\n\nYou can define variables according to scopes.\n* group_vars/all.sh\n* group_vars/mygroup.sh\n* host_vars/host1.sh\n* roles/sample/vars/main.sh\n\n### File Module\n\"File\" module can create or delete a directory.\n\nType out the following to define the variable \"MESSAGE\" for \"File\" module.\n```\ncat \u003c\u003c EOF \u003e group_vars/all.sh \nDIRS=\"\n/tmp/target/foo\n/tmp/target/bar\n\"\nEOF\n```\n\nType out the following to use \"File\" module.\n```\ncat \u003c\u003c \"EOF\" \u003e roles/sample/tasks/main.sh\n_debug \\\n    msg=\"File Module\"\nfor dir in ${DIRS}\ndo\n    _file \\\n        path=${dir} \\\n        state=directory\ndone\nEOF\n```\n\nType out the following.\n```\nshellsible-playbook.sh mygroup\n```\n\nYou can confirm the result of the playbook.\n```\n2024/08/14 02:03:12 INFO  [mygroup,host1,sample,debug] File Module\n```\n\nType out the following.\n```\nls -l /tmp/target/\n```\n\nYou can also confirm the result of \"File\" module.\n```\ntotal 0\ndrwxr-xr-x 2 root root 6 Aug 14 02:02 bar\ndrwxr-xr-x 2 root root 6 Aug 14 02:02 foo\n```\n\n### Copy Module\nThe \"Copy\" module can send a file from the local host to the target host.\n\nType out the following to define the variable \"MESSAGE\" for \"File\" module.\n```\ncat \u003c\u003c EOF \u003e roles/sample/files/input.txt\nINPUT\nEOF\n```\n\nType out the following to use \"Copy\" module.\n```\ncat \u003c\u003c \"EOF\" \u003e roles/sample/tasks/main.sh\n_copy \\\n    src=input.txt \\\n    dest=/tmp/target/foo\nEOF\n```\n\nType out the following.\n```\nshellsible-playbook.sh mygroup\n```\n\nYou can confirm the result of the playbook.\n```\n2024/08/14 02:14:30 INFO  [mygroup,host1,sample,copy] scp /tmp/playbook/roles/sample/files/input.txt root@127.0.0.1:/tmp/target/foo\n```\n\nType out the following.\n```\ncat /tmp/target/foo/input.txt\n```\n\nYou can also confirm the result of \"Copy\" module.\n```\nINPUT\n```\n\n### Fetch Module\nThe \"Fetch\" module can send a file from the target host to the local host.\n\nType out the following to use \"Fetch\" module.\n```\ncat \u003c\u003c \"EOF\" \u003e roles/sample/tasks/main.sh\n_fetch \\\n    src=/tmp/target/foo/input.txt \\\n    dest=/tmp\nEOF\n```\n\nType out the following.\n```\nshellsible-playbook.sh mygroup\n```\n\nYou can confirm the result of the playbook.\n```\n2024/08/14 02:18:53 INFO  [mygroup,host1,sample,fetch] scp root@127.0.0.1:/tmp/target/foo/input.txt /tmp\n```\n\nType out the following.\n```\ncat /tmp/input.txt\n```\n\nYou can also confirm the result of \"Fetch\" module.\n```\nINPUT\n```\n\n### Modules\n\n#### Copy\n\n* The \"Copy\" module can send a file from the local host to the target host.\n\nParameters\n\n| Parameter | Choices | Comments |\n|:----------|:----------|:----------|\n| dest | | Remote absolute path where the file should be copied to |\n| src | | Local path to a file to copy to the remote host |\n\n#### Debug\n\n* The \"Debug\" module can output a message.\n\nParameters\n\n| Parameter | Choices | Comments |\n|:----------|:----------|:----------|\n| msg | | Message |\n\n#### Fetch\n\n* The \"Fetch\" module can send a file from the target host to the local host.\n\nParameters\n\n| Parameter | Choices | Comments |\n|:----------|:----------|:----------|\n| dest | | A directory to save the file into |\n| src | | The file on the remote system to fetch |\n\n#### File\n\n* \"File\" module can create or delete a directory.\n\nParameters\n\n| Parameter | Choices | Comments |\n|:----------|:----------|:----------|\n| owner* | | Name of the user that should own the directory |\n| group* | | Name of the group that should own the directory |\n| mode* | | Used for /usr/bin/chmod |\n| path | | Path to the file being managed |\n| state* | directory(default) or absent    | Create or delete a directory |\n\n## Author\n\nShellsible was created by Yuji Konishi.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuji-k64613%2Fshellsible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuji-k64613%2Fshellsible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuji-k64613%2Fshellsible/lists"}