Skip to content

Commit

Permalink
Merge pull request #19 from carlbuchmann/remote-roles
Browse files Browse the repository at this point in the history
Remote roles
  • Loading branch information
carlbuchmann authored Feb 27, 2019
2 parents 239cfde + dbd11df commit 559f126
Show file tree
Hide file tree
Showing 22 changed files with 71 additions and 404 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# iac-dev - Release 2.1.3
# iac-dev - Release 2.2rc

This playbook configures RedHat/Centos or Debian/Ubuntu workstation for `Infrastructure as Code` development with Ansible.

Expand Down Expand Up @@ -26,11 +26,13 @@ It configures your IaC Development workstation with:
- `git config --global user.email "[email protected]"`
- `git config --global user.name "Your Name"`
6. Clone this repository to your home directory: `git clone https://github.com/carlbuchmann/iac-dev`
7. *Optional Customization* :
- to enable WinRM: Edit `./iac-dev/roles/ansible-engine/defaults/main.yml` and enter your active directory domain information
- Add/remove vscode extensions: Edit `./iac-dev/roles/vscode/defaults/main.yml` ( recommended extensions will be installed by default )
8. run playbook: `ansible-playbook iac-dev.yml --ask-become-pass`
9. launch vscode: `code` and start developing!
7. change directory to iac-dev `cd iac-dev/`
8. Install requires roles: `ansible-galaxy install -r roles/requirements.yml --force`
9. *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 )
10. run playbook: `ansible-playbook iac-dev.yml --ask-become-pass`
11. launch vscode: `code` and start developing!

## Installation Instructions Debian/Ubuntu

Expand All @@ -46,17 +48,19 @@ It configures your IaC Development workstation with:
- `git config --global user.email "[email protected]"`
- `git config --global user.name "Your Name"`
6. Clone this repository to your home directory: `git clone https://github.com/carlbuchmann/iac-dev`
7. *Optional Customization* :
- to enable WinRM: Edit `./iac-dev/roles/ansible-engine/defaults/main.yml` and enter your active directory domain information
- Add/remove vscode extensions: Edit `./iac-dev/roles/vscode/defaults/main.yml` ( recommended extensions will be installed by default )
8. run playbook: `ansible-playbook iac-dev.yml --ask-become-pass`
9. launch vscode: `code` and start developing!
7. change directory to iac-dev `cd iac-dev/`
8. Install requires roles: `ansible-galaxy install -r roles/requirements.yml --force`
9. *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 )
10. run playbook: `ansible-playbook iac-dev.yml --ask-become-pass`
11. launch vscode: `code` and start developing!

### Recommended Visual Studio Code extentions

- [YAML Support by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
- [Jinja](https://marketplace.visualstudio.com/items?itemName=wholroyd.jinja)
- [Jinja](https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml)
- [PowerShell](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell)
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
- [Ansible](https://marketplace.visualstudio.com/items?itemName=vscoss.vscode-ansible)
Expand Down
10 changes: 9 additions & 1 deletion roles/vscode/defaults/main.yml → host_vars/localhost.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
vs_code_extensions:
# windows domain name
domain: homelab.local
# Domain controllers list
domain_controllers:
- dc01.homelab.local
- dc02.homelab.local

# Micrososft Visual Studio Extensions
vscode_extensions:
- redhat.vscode-yaml
- samuelcolvin.jinjahtml
- ms-python.python
Expand Down
42 changes: 26 additions & 16 deletions iac-dev.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
- hosts: localhost
become: true

tasks:

- name: Install XRDP
include_role:
name: xrdp

- name: Install Visual Studio Code
include_role:
name: vscode
- name: Install Git
import_role:
name: git
tags: git

- name: Install PowerShell
import_role:
name: powershell
tags: powershell

- name: Install XRDP
import_role:
name: xrdp
tags: xrdp

- name: Install Git
include_role:
name: git
- name: Deploy latest version of ansible, enable windows remote management with kerberos and install various module dependencies
import_role:
name: ansible-engine
tags: ansible

- name: Install PowerShell
include_role:
name: powershell
- hosts: localhost

- name: Deploy latest version of ansible, enable windows remote management with kerberos and install various module dependencies
include_role:
name: ansible-engine
tasks:

- name: Install Visual Studio Code
import_role:
name: vscode
tags: vscode

8 changes: 0 additions & 8 deletions roles/ansible-engine/defaults/main.yml

This file was deleted.

105 changes: 0 additions & 105 deletions roles/ansible-engine/tasks/main.yml

This file was deleted.

27 changes: 0 additions & 27 deletions roles/ansible-engine/templates/kerberos-reamls.j2

This file was deleted.

13 changes: 0 additions & 13 deletions roles/ansible-engine/vars/Debian.yml

This file was deleted.

13 changes: 0 additions & 13 deletions roles/ansible-engine/vars/RedHat.yml

This file was deleted.

19 changes: 0 additions & 19 deletions roles/git/tasks/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/git/vars/Debian.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/git/vars/RedHat.yml

This file was deleted.

10 changes: 0 additions & 10 deletions roles/powershell/tasks/main.yml

This file was deleted.

30 changes: 0 additions & 30 deletions roles/powershell/tasks/setup-Debian.yml

This file was deleted.

19 changes: 0 additions & 19 deletions roles/powershell/tasks/setup-RedHat.yml

This file was deleted.

Loading

0 comments on commit 559f126

Please sign in to comment.