Skip to content

Commit

Permalink
New structure
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoprudente committed Nov 30, 2020
1 parent 2d28b2f commit 336ef4e
Show file tree
Hide file tree
Showing 245 changed files with 623 additions and 5,869 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms
---
github: hugoprudente
patreon: nerdweekoficial
56 changes: 56 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- planned

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

pulls:
markComment: |-
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale.
unmarkComment: >-
This pull request is no longer marked for closure.
closeComment: >-
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.
issues:
markComment: |-
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
unmarkComment: >-
This issue is no longer marked for closure.
closeComment: >-
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
55 changes: 0 additions & 55 deletions .github/workflows/ansible-lint.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/cfn-lint.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
name: CI
'on':
pull_request:
push:
branches:
- master
schedule:
- cron: "0 5 * * 4"

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install yamllint ansible-lint

- name: Lint code.
run: |
yamllint .
ansible-lint
integration:
name: Integration
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-10.15

steps:
- name: Check out the codebase.
uses: actions/checkout@v2

- name: Uninstall GitHub Actions' built-in Homebrew.
run: tests/uninstall-homebrew.sh

- name: Uninstall GitHub Actions' built-in browser installs.
run: |
sudo rm -rf /Applications/Firefox.app
sudo rm -rf /Applications/Google\ Chrome.app
- name: Install test dependencies.
run: sudo pip3 install ansible

- name: Set up the test environment.
run: |
cp tests/ansible.cfg ./ansible.cfg
cp tests/inventory ./inventory
cp tests/config.yml ./config.yml
ansible-galaxy install -r requirements.yml -p ./roles
- name: Test the playbook's syntax.
run: ansible-playbook main.yml --syntax-check

- name: Test the playbook.
run: ansible-playbook main.yml
env:
ANSIBLE_FORCE_COLOR: '1'

- name: Idempotence check.
run: |
idempotence=$(mktemp)
ansible-playbook main.yml | tee -a ${idempotence}
tail ${idempotence} | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
env:
ANSIBLE_FORCE_COLOR: '1'
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.vagrant
.DS_Store
*.retry
roles*
config.yml
33 changes: 33 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# Based on ansible-lint config
extends: default

rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable
Empty file removed CONTRIBUTING.md
Empty file.
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

69 changes: 29 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,51 @@
# All Might Box
# Sys / Dev / Ops Development Ansible Playbook

This is the Ansible Roles that I use to configure my Developer, SysAdmin & DevOps box
[![CI][badge-gh-actions]][link-gh-actions]

## Why?
* From: Everywhere
* With: Vim / Vim Support
* And: Any Device
This playbook installs and configures most of the software I use on my workstations for development, sysadmin, SRE, DevOps and Fun!

## Deploy
Totally inspired by [mac-dev-playbook](https://github.com/geerlingguy/mac-dev-playbook) by Geerlingguy!

```bash
$sudo apt-get install python3 python3-pip
```
## Installation

### Localhost
### OSX Only

```bash
$git --depth=1 clone https://github.com/hugoprudente/all-might-box.git
```
1. Ensure Apple's command line tools are installed (`xcode-select --install` to launch the installer).
1. Continue with the steps for Linux and Windows (WSL)

**Install Ansible**
### Linux & Windows (WSL)
1. [Install Ansible](http://docs.ansible.com/intro_installation.html).
1. Clone this repository to your local drive.
1. Run `$ ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible roles.
1. Run `ansible-playbook main.yml -i inventory --ask-become-pass` inside this directory. Enter your account password when prompted.

Using the [official documentation](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#) install Ansible.
> Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run `brew doctor` to see if this is the case.
**Run the playbook**
### Running a specific set of tagged tasks

```bash
$ansible-playbook --connection=local --inventory 127.0.0.1, playbook.yml --extra-vars "user=$USER"
```
You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`.

**Configuration**
ansible-playbook main.yml -i inventory -K --tags "dotfiles,homebrew"

### Cloud
## Overriding Defaults

Configure the *REGION*, *NAME*, and *IAMUSER* on the **bin/deploy**, file to match your AWS configurations.
Not everyone's development environment and preferred software configuration is the same.

```
REGION=eu-west-1
NAME=cloud9pp
IAMUSER=$USER
So you can customize your one using as base `default.config.yml` by creating a `config.yml` file and changing to your taste!

```
## Included Applications / Configuration (Default)

Deploy it!
* [x] Ansible

```
$bin/deploy
```
## Testing the Playbook

This creates [Public (IGW)/Private(NAT)](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html) subnets using all available AZs on give region and create a Cloud9 with extra volume and 2 CodeCommit repositories.
Use the [Mac OS X VirtualBox VM](https://github.com/geerlingguy/dev-osx-virtualbox-vm).

## Extra Setup
Additionally, this project is [continuously tested on GitHub Actions' macOS infrastructure](https://github.com/hugoprudente/box-dev-playbook/actions?query=workflow%3ACI).

TODO, add ansible playbooks
]
## Author

## Development
[Hugo Prudente]([email protected])

```
pip3 install ansible-lint
```
[badge-gh-actions]: https://github.com/hugoprudente/box-dev-playbook/workflows/CI/badge.svg?event=push
[link-gh-actions]: https://github.com/hugoprudente/box-dev-playbook/actions?query=workflow%3ACI
6 changes: 0 additions & 6 deletions TODO

This file was deleted.

7 changes: 0 additions & 7 deletions all-might-box.code-workspace

This file was deleted.

7 changes: 7 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[defaults]
nocows = True
roles_path = ./roles:/etc/ansible/roles

[ssh_connection]
pipelining = True
control_path = /tmp/ansible-ssh-%%h-%%p-%%r
Loading

0 comments on commit 336ef4e

Please sign in to comment.