Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justin-p/ansible-playbook-terraform-workstation
A Ansible playbook that configures a workstations for Ansible and Terraform development in VS Code.
https://github.com/justin-p/ansible-playbook-terraform-workstation
ansible ansible-playbook hacktoberfest terraform vscode
Last synced: 25 days ago
JSON representation
A Ansible playbook that configures a workstations for Ansible and Terraform development in VS Code.
- Host: GitHub
- URL: https://github.com/justin-p/ansible-playbook-terraform-workstation
- Owner: justin-p
- License: mit
- Created: 2020-06-06T19:43:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T20:10:11.000Z (8 months ago)
- Last Synced: 2024-03-19T21:32:41.015Z (8 months ago)
- Topics: ansible, ansible-playbook, hacktoberfest, terraform, vscode
- Language: Shell
- Homepage:
- Size: 130 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-playbook-terraform-workstation
[![Github Actions](https://img.shields.io/github/actions/workflow/status/justin-p/ansible-playbook-terraform-workstation/main.yml?label=Github%20Actions&logo=github&style=flat-square)](https://github.com/justin-p/ansible-playbook-terraform-workstation/actions)
A Ansible playbook that configures a Ubuntu client for Ansible and Terraform development in VS Code.
I created this playbook so that someone who is not familiar with Ansible or Terraform can easly spin up a environment where the needed tools (I.E: `Ansible`,`Terrform`,`doctl`, `aws-cli`, `molecule`) and a IDE are neatly configured for them.
![vscode](img/vscode.png)
**Note:** Preferably run this in a VM, not on your actual machine. This playbook might overwrite some exisiting settings if you are using some of these tools. Once you are familiar with Ansible just create your own playbook that set these things up for you :wink:
## Installation
### Quick
1. Run `curl https://raw.githubusercontent.com/justin-p/ansible-terraform-workstation/master/setup.sh | bash`
2. Enter sudo password.
3. Reboot the system.### Manual
1. `git clone https://github.com/justin-p/ansible-playbook-terraform-workstation`
2. `cd ansible-playbook-terraform-workstation`
4. `sudo apt-get update -y && sudo apt-get install git curl python3 python3-pip`
5. `pip3 install --user ansible `
6. `export PATH=$PATH:/$HOME/.local/bin`
7. `ansible-galaxy install -r requirements.yml`
8. `ansible-playbook main.yml -i inventory.yml`
9. Reboot the system.## Local Development
This playbook includes Molecule that will spin up a local docker environment to deploy, configure and test this playbook.
Development requirements:
- Docker
- Molecule
- yamllint
- ansible-lintor simply use a VM with [this](https://github.com/justin-p/ansible-terraform-workstation) configuration.
### Basic Molecule usage
- Build a container and apply the current playbook: `molecule converge`
Note, when using converge the container is not destroyed, allowing you to quickly test changes by running this command consecutive times.- Interact with the containers created by molecule: `molecule login`
Note, this works great with converge allowing you to peek inside the container and manually check why things didnt work.- Apply tests defined in the `verify.yml` file: `molecule verify`
- Remove any containers left over from the converge command: `molecule destroy`
- Run the playbook and any included tests against clean containers: `molecule test`
## License
MIT
## Authors
Justin Perdok ([@justin-p](https://github.com/justin-p/))
## Contributing
Feel free to open issues, contribute and submit your Pull Requests. You can also ping me on Twitter ([@JustinPerdok](https://twitter.com/JustinPerdok)).