Skip to content

Instantly share code, notes, and snippets.

---
- hosts: all
connection: local
pre_tasks:
- name: pre task
shell: |
date
register: pre
- name: pre task debug
---
- hosts: localhost
connection: local
tasks:
- name: Be sure firefox running
test_process:
name: firefox
state: present
args:
---
- name: Import public key
apt_key:
keyserver: keys.gnupg.net
id: 1C4CBDCDCD2EFD2A
state: present
- name: Add percona apt repository
apt_repository:
repo: "{{ item }}"
package main
import (
"encoding/json"
"fmt"
"os"
)
type response1 struct {
Page int
package main
import (
"fmt"
"runtime"
"github.com/caarlos0/gohome"
)
const appName = "myapp"
package main
import (
"fmt"
"io/ioutil"
)
func main() {
entries, _ := ioutil.ReadDir(".")
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"github.com/caarlos0/gohome"
)
module "vpc" {
source = "github.com/terraform-community-modules/tf_aws_vpc"
name = "chap2-vpc"
cidr = "172.16.0.0/16"
public_subnets = "172.16.1.0/24"
azs = "ap-northeast-1a"
enable_dns_support = true
enable_dns_hostnames = false
}
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"VPC": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "172.30.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
- hosts: all
tasks:
- name: Create a group of all hosts by operating system
group_by: key={{ansible_distribution}}-{{ansible_distribution_version}}
# the following host group does not exist in inventory and was created by the group_by
# module.