iac-dev
iac-dev copied to clipboard
Infrastructure as Code Development Workstation: RedHat/Centos or Debian/Ubuntu
iac-dev - Release 2.4
This playbook configures RedHat/Centos or Debian/Ubuntu workstation for Infrastructure as Code
development with Ansible.
It configures your IaC Development workstation with:
- Microsoft Visual Studio Code
- Python
- PowerShell Core for Linux
- Latest Version of Git
- Latest Version of Ansible +
- WinRM + Kerberos Authentication for windows automation through Ansible
- Various python libraries for common modules (Azure,AWS,Google Cloud,F5,NAPALM, or add your own!)
- Remote Desktop (xRDP+TigerVNC) for easy access (RedHat/Centos Only)
Installation Instructions RedHat/Centos
- Download and install latest version of Centos/RedHat 7 with Gnome Desktop Environment Centos Download.
- During installation, create local user and grant administrator privileges
- After successful installation, open a terminal window:
-
Install Ansible from epel repo:
-
sudo yum install epel-release
-
sudo yum install ansible
-
-
Install Git and configure Git user:
-
sudo yum install git
-
git config --global user.email "[email protected]"
-
git config --global user.name "Your Name"
-
- Clone this repository to your home directory:
git clone https://github.com/carlbuchmann/iac-dev
- change directory to iac-dev
cd iac-dev/
- Install requires roles:
ansible-galaxy install -r roles/requirements.yml --force
-
Optional Customization :
- to enable WinRM: Edit
./iac-dev/host_vars/localhost.yml
and enter your active directory domain information - Add/remove vscode extensions: Edit
./iac-dev/host_vars/localhost.yml
( recommended extensions will be installed by default )
- to enable WinRM: Edit
- run playbook:
ansible-playbook iac-dev.yml --ask-become-pass
- launch vscode:
code
and start developing!
Installation Instructions Debian/Ubuntu
- Download and install latest version of Debian/Ubuntu 18.0.4 Desktop Ubuntu Download.
- During installation, create local user and grant administrator privileges
- After successful installation, open a terminal window:
-
Install Ansible:
-
sudo apt-add-repository ppa:ansible/ansible
-
sudo apt-get update
-
sudo apt-get install ansible
.
-
-
Install Git and configure Git user:
-
sudo apt-get install git-core
-
git config --global user.email "[email protected]"
-
git config --global user.name "Your Name"
-
- Clone this repository to your home directory:
git clone https://github.com/carlbuchmann/iac-dev
- change directory to iac-dev
cd iac-dev/
- Install requires roles:
ansible-galaxy install -r roles/requirements.yml --force
-
Optional Customization :
- to enable WinRM: Edit
./iac-dev/host_vars/localhost.yml
and enter your active directory domain information - Add/remove vscode extensions: Edit
./iac-dev/host_vars/localhost.yml
( recommended extensions will be installed by default )
- to enable WinRM: Edit
- run playbook:
ansible-playbook iac-dev.yml --ask-become-pass
- launch vscode:
code
and start developing!
Recommended Visual Studio Code extentions
Notes:
- After installation, you may want to enable/disable extension depending on what you are doing, for example I disable GitLens unless I'm reviewing code.
- YAML Linting on Ansible playbook with YAML Support by Red Hat may report syntax problems which are false positives. It's not a problem with the extension but the schema, which is auto-generated from Ansible Code. see: example issue
Getting Started with IaC
PRs welcome
Please submit a PR to help enhance this playbook!