Skip to content

Instantly share code, notes, and snippets.

View dgmorales's full-sized avatar

Diego Morales dgmorales

View GitHub Profile
@dgmorales
dgmorales / iis.yml
Last active December 28, 2023 18:25
Ansible Windows playbook example - creates an IIS website and deploys files for it
---
- hosts: windows
vars:
ansible_site_path: "c:\\inetpub\\wwwroot\\ansibletest"
staging_path: "c:\\deploy"
ansible_test_staging_path: "{{ staging_path }}\\ansible-test-site-{{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }}"
tasks:
- name: install-iis
win_feature:
name: "Web-Server"
@dgmorales
dgmorales / Makefile
Last active February 14, 2023 06:18
Example Makefile for creating deb/rpm packages with jordansissel/fpm
# This is an example Makefile for quick package creation
#
# It uses FPM [1] to generate simple packages.
# - If you need more features or a greater quality package, use debian
# standard tools for packaging.
# - Do not use checkinstall. Use FPM instead.
#
# [1] (https://github.com/jordansissel/fpm/wiki)
# IMPORTANT:
# Objetivo geral do projeto
## Nosso objetivo, genericamente:
Disponibilizar um database as service para nossos desenvolvedores, integrado ao nosso projeto de plataforma interna.
A solução precisará suportar ao menos:
- PostgreSQL
- MongoDB
- MS SQLServer
@dgmorales
dgmorales / CODEOWNERS
Last active March 23, 2019 14:30
GitHub CODEOWNERS example for Terraform GitHub management scenario
$ cat .github/CODEOWNERS
# This file defines who should review and approve changes in each tribe or team, and
# also other content inside this repo.
#
# Code owners are automatically requested for review when someone opens a pull
# request that modifies code that they own.
# See https://help.github.com/articles/about-codeowners/
* @approvers-top-level
@dgmorales
dgmorales / CODEOWNERS
Created March 23, 2019 14:28
GitHub CODEOWNERS example for Terraform GitHub management scenario
$ cat .github/CODEOWNERS
# This file defines who should review and approve changes in each tribe, and
# also other content inside this repo.
#
# Code owners are automatically requested for review when someone opens a pull
# request that modifies code that they own.
# See https://help.github.com/articles/about-codeowners/
* @approvers-top-level
@dgmorales
dgmorales / vaga
Last active March 21, 2019 17:42
Desenvolvedor de Infraestrutura
(essa é uma área de infraestrutura, mas é preciso reforçar que estamos procurando avidamente também perfis mais focados em
desenvolvimento que queiram se encaixar dentro dela)
Estamos buscando um profissional que consiga trabalhar em um time multidisciplinar, que tenha sólidos conhecimentos de
programação, bons fundamentos de sistemas operacionais e redes, experiência com tecnologias de automação, e facilidade para
trabalhar com metodologias ágeis dentro de uma cultura DevOps. Um perfil curioso e autodidata, com interesse em grandes
desafios técnicos.
@dgmorales
dgmorales / terraform-github-example-3.tf
Last active February 2, 2019 22:55
A GitHub org member map terraform module example
# modules/org-member/variable.tf
variable "email" {
description = "email - (Required) The email address of the user"
}
variable "role" {
description = "role - (Optional) The user role in the org"
default = "member"
}
@dgmorales
dgmorales / terraform-github-example-5.tf
Created February 2, 2019 21:31
Terraform example showing list, count and function usage on resources
locals {
org_user_list = [
"someguy",
"someotherguy",
"dgmorales"
]
}
resource "github_membership" "dgmorales" {
count = "${length(local.org_user_list)}"
username = "${element(local.org_user_list, count.index)}"
@dgmorales
dgmorales / terraform-github-example-4.tf
Created February 2, 2019 21:28
A Terraform example showing the usage of the org-member module shown before
module "otherguy__stone_com_br" {
source = "../modules/org-member"
email = "other.guy@stone.com.br"
}
@dgmorales
dgmorales / terraform-github-example-2.tf
Created February 2, 2019 21:21
An email to github username map Terraform module
# modules/user-map/main.tf
locals {
user_map = {
"someguy@stone.com.br" = "someguy"
"otherguy@stone.com.br" = "strangenick89"
}
}
# modules/user-map/output.tf
output "map" {