{"id":17835864,"url":"https://github.com/guitarrapc/scoopplaybook","last_synced_at":"2025-03-19T17:31:02.637Z","repository":{"id":33848443,"uuid":"163014334","full_name":"guitarrapc/ScoopPlaybook","owner":"guitarrapc","description":"Define Scoop as YAML and run single command.","archived":false,"fork":false,"pushed_at":"2023-11-14T09:38:17.000Z","size":155,"stargazers_count":21,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-24T00:18:15.563Z","etag":null,"topics":["powershell","scoop"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/ScoopPlaybook","language":"PowerShell","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/guitarrapc.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}},"created_at":"2018-12-24T18:12:38.000Z","updated_at":"2023-12-11T01:19:27.000Z","dependencies_parsed_at":"2023-10-13T09:48:52.794Z","dependency_job_id":null,"html_url":"https://github.com/guitarrapc/ScoopPlaybook","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitarrapc%2FScoopPlaybook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitarrapc%2FScoopPlaybook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitarrapc%2FScoopPlaybook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitarrapc%2FScoopPlaybook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guitarrapc","download_url":"https://codeload.github.com/guitarrapc/ScoopPlaybook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221729417,"owners_count":16871014,"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":["powershell","scoop"],"created_at":"2024-10-27T20:26:26.387Z","updated_at":"2024-10-27T20:26:26.970Z","avatar_url":"https://github.com/guitarrapc.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build](https://github.com/guitarrapc/ScoopPlaybook/workflows/build/badge.svg) ![release](https://github.com/guitarrapc/ScoopPlaybook/workflows/release/badge.svg)\n\n## ScoopPlaybook\n\nPowerShell Module to Play Scoop like Ansible\n\n* :white_check_mark: Desktop\n* :white_check_mark: NetCore\n\n## Installation\n\n```ps1\nInstall-Module ScoopPlaybook -Scope CurrentUser\n```\n\n## Functions\n\nFunction | Description\n---- | ----\nScoop-Playbook | Run scoop as with ansible structured YAML definitions\n\n## Quick Start\n\n[Install scoop beforehand](https://scoop.sh/), then clone repo and run module.\n\n```ps1\nInstall-Module PowerShell-Yaml -Scope CurrentUser\nInstall-Module ScoopPlaybook -Scope CurrentUser\n\ngit clone https://github.com/guitarrapc/ScoopPlaybook.git\ncd ScoopPlaybook/samples\nScoop-Playbook\n```\n\nThis sample will install busybox, 7zip and gitkraken for you.\n\n## Step by step Start\n\nCreate ansible like folder structures, let make main role.\n\n```ps1\nmkdir roles/main/tasks\n```\n\nDefine your scoop bucket and package installation definition in your main role's task/main.yml.\n\n```shell\nNew-Item roles/main/tasks/main.yml\ncode roles/main/tasks/main.yml\n```\n\n```yaml\n- name: \"Install linux tools\"\n  scoop_install:\n    state: present\n    bucket: main\n    name:\n      - busybox\n\n- name: \"Install windows tools\"\n  scoop_install:\n    state: present\n    bucket: main\n    name:\n      - 7zip\n\n- name: \"Install extras bucket\"\n  scoop_bucket_install:\n    state: present\n    bucket: extras\n\n- name: \"Install extras tools\"\n  scoop_install:\n    state: present\n    bucket: extras\n    name:\n      - gitkraken\n```\n\nDefine your site.yml to select which role to use.\n\n```shell\nNew-Item site.yml\ncode site.yml\n```\n\n```yaml\nname: main\nroles:\n  - main\n```\n\nYou are ready, let's run ScoopPlaybook Cmdlet to install scoop packages and buckets you desired.\n\n```shell\nInstall-Module PowerShell-Yaml -Scope CurrentUser\nInstall-Module ScoopPlaybook -Scope CurrentUser\nScoop-Playbook\n```\n\nYou can uninstall scoop package via state `absent`.\n\n```yaml\n- name: \"UnInstall windows tools\"\n  scoop_install:\n    state: absent\n    bucket: main\n    name:\n      - 7zip\n```\n\nmore samples? see https://github.com/guitarrapc/local-provisioner/tree/master/envs/windows\n\n## Definition\n\n### Structures\n\nStructure is follow to ansible, but there are only role function, no variables or any.\n\n* site.yml: site.yml is entrypoint of scheme, and select which role to call.\n* role: role must place under `roles/\u003croleName\u003e` folder. Site.yml call role must match a role folder name.\n* task: task must place under `roles/\u003croleName\u003e/tasks/main.yml`. task contains multiple modules.\n* module: module offer what you can do. there are 2 modules you can use.\n    * scoop_install\n    * scoop_bucket_install\n\n`site.yml` file location is where your must run `Scoop-Playbook` Cmdlet.\nHere's sample structures.\n\n```\nsite.yml\n└───roles\n    ├───main\n    │   └───tasks\n    │       └───main.yml\n    └───extras\n        └───tasks\n            └───main.yml\n```\n\n\n### SCHEME\n\n**site.yml scheme**\n\nSelect which role to call.\n\n```yaml\nname: \"\u003cstring\u003e\" # REQUIRED: name of you definition\nroles:\n  - \"\u003cstring\u003e\" # REQUIRED: role name to call. this roll name must match rolle file name.\n```\n\n**Module - scoop_install module**\n\n`scoop_install` Module offer Install/Uninstall scoop package from selected bucket.\n\n```yaml\n- name: \"\u003cstring\u003e\" # REQUIRED: name of module\n  scoop_install:\n    state: \"present|absent\" # OPTIONAL (default \"present\"): enums of present or absent. present to install, absent to uninstall.\n    bucket: \"\u003cstring\u003e\" # REQUIRED: bucket name to install package.\n    name:\n      - \"\u003cstring\u003e\" # REQUIRED: list of strings to identify package names\n```\n\n**Module - scoop_bucket_install module**\n\n`scoop_bucket_install` module offers Install/Uninstall scoop bucket.\n\n```yaml\n- name: \"\u003cstring\u003e\" # REQUIRED: name of module\n  scoop_bucket_install:\n    state: \"present|absent\" # OPTIONAL: present to install, absent to uninstall. default \"present\".\n    bucket: \"\u003cstring\u003e\" # REQUIRED: bucket name to install package.\n```\n\n## Test\n\nPlease install \"git\" before running test.\n\n```ps1\n# Pester 5.3.1\nInstall-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck\nInstall-Module PSScriptAnalyzer -Force -Scope CurrentUser\nInstall-Module PowerShell-Yaml -Force -Scope CurrentUser\nscoop install git\nInvoke-Pester\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguitarrapc%2Fscoopplaybook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguitarrapc%2Fscoopplaybook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguitarrapc%2Fscoopplaybook/lists"}