{"id":19601507,"url":"https://github.com/stackstorm/st2-ansible-vagrant","last_synced_at":"2025-04-27T17:32:00.042Z","repository":{"id":32110243,"uuid":"35682591","full_name":"StackStorm/st2-ansible-vagrant","owner":"StackStorm","description":"Demo showing Ansible integration with StackStorm","archived":false,"fork":false,"pushed_at":"2018-12-20T21:53:31.000Z","size":31,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":17,"default_branch":"master","last_synced_at":"2023-03-22T17:34:43.725Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackStorm.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}},"created_at":"2015-05-15T15:49:25.000Z","updated_at":"2022-11-19T15:35:14.000Z","dependencies_parsed_at":"2022-09-11T00:12:51.692Z","dependency_job_id":null,"html_url":"https://github.com/StackStorm/st2-ansible-vagrant","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-ansible-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-ansible-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-ansible-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-ansible-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackStorm","download_url":"https://codeload.github.com/StackStorm/st2-ansible-vagrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224076256,"owners_count":17251718,"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":[],"created_at":"2024-11-11T09:18:43.128Z","updated_at":"2024-11-11T09:18:44.530Z","avatar_url":"https://github.com/StackStorm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"StackStorm with Ansible on Vagrant demo\n===========\n\n![StackStorm with Ansible on Vagrant demo](http://i.imgur.com/wwcFk8t.png)\n\n\u003e Part of the blog: [New In StackStorm: Ansible Integration](https://stackstorm.com/2015/06/05/new-in-stackstorm-ansible-integration/)\n\n### Introduction\nThis is quick demonstration of the [StackStorm](http://stackstorm.com/) automation platform running with [Ansible configuration management pack](https://github.com/StackStorm/st2contrib/tree/master/packs/ansible).\n\nIt will get you up and running with `master` VM running all St2 components as well as Ansible.\nAdditionally, it installs 2 clean Ubuntu VMs: `node1`, `node2` and performs ansible commands against them.\n\n### Instructions\nTo provision the environment run:\n\n    vagrant up\n\n![StackStorm Ansible Integration](https://cloud.githubusercontent.com/assets/1533818/16920519/97d4a76e-4d16-11e6-817e-1edcb2e16de0.gif)\n\n\u003e Check the results of performed commands in StackStorm control panel:  \nhttps://www.master/\nusername: `demo`\npassword: `demo`\n\nDon't forget to visit: \n* http://www.node1/\n* http://www.node2/\n\n### Explanation\nEverything below is performed as part of Vagrant provision:\n\n* Install st2 platform and verify installation \n* Install st2 `ansible` pack from remote repository\n* Copy ansible configuration files from vagrant shared directory into '/etc/ansible' on `master`\n* Test `ansible.command_local` actions ([ad-hoc](http://docs.ansible.com/intro_adhoc.html) ansible command) against local `master` machine\n* Test `ansible.command` actions ([ad-hoc](http://docs.ansible.com/intro_adhoc.html) ansible command) against both local `master` and remote `node1` `node2` machines\n* Test `ansible.galaxy` actions, install, list and then remove roles installed from [Ansible Galaxy](https://galaxy.ansible.com/)\n* Test `ansible.vault` actions, encrypt/decrypt playbooks and run them\n* Test `ansible.playbook` action, run [nginx.yml playbook](ansible/playbooks/nginx.yml) against all machines\n* Let the nginx on latest node greet your cat (what?!), have fun\n\nSome of the commands: \n```sh\n# Run simple ansible.command locally\nst2 run ansible.command_local args='echo $TERM'\n\n# Run 'hostname -i' ansible.command on all machines (master and nodes) \nst2 run ansible.command hosts=all args='hostname -i'\n\n# Ping all machines in 'nodes' group\nst2 run ansible.command hosts=nodes module_name=ping\n\n# Install nginx via playbook on all machines \nst2 run ansible.playbook playbook=/etc/ansible/playbooks/nginx.yml\n\n# Run nginx playbook on latest node machine, set nginx index.html welcome message\nst2 run ansible.playbook playbook=/etc/ansible/playbooks/nginx.yml extra_vars='welcome_name=Tom' limit='nodes[-1]'\n\n...\n```\n\nFor all commands executed see: [`ansible.sh`](ansible.sh), [`ansible-galaxy.sh`](ansible-galaxy.sh), [`ansible-vault.sh`](ansible-vault.sh) and [`ansible-playbook.sh`](ansible-playbook.sh),\nwhich are usual Vagrant shell provisioner scripts.\n\n### Related Resources\n* [Ansible \u0026 ChatOps w StackStorm Tutorial \u0026 Vagrant demo :rocket:](http://stackstorm.com/2015/06/24/ansible-chatops-get-started-%f0%9f%9a%80/)\n* [Ansible integration Pack](https://github.com/StackStorm/st2contrib/tree/master/packs/ansible)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackstorm%2Fst2-ansible-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackstorm%2Fst2-ansible-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackstorm%2Fst2-ansible-vagrant/lists"}