This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#chkconfig: 2345 85 15 | |
#descpriction: h2o Web Server | |
# source function library | |
. /etc/rc.d/init.d/functions | |
RETVAL=0 | |
SERVICE_NAME=`basename $0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.json': | |
'variables': | |
'prefix':'variables' | |
'body': """ | |
variable "${1:resource_name}" { | |
default = "${2:value}" | |
} | |
""" | |
'aws_instance': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## SFTPログイン時に/var/www/html配下のみ表示する | |
## sftpグループに所属しているユーザ(tatoeba, kimiga, kizutuite)にはUmask 002を付与 | |
# override default of no subsystems | |
#Subsystem sftp /usr/libexec/openssh/sftp-server | |
Subsystem sftp internal-sftp | |
Match user tatoeba | |
ChrootDirectory /var/www | |
ForceCommand internal-sftp -u 002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks/main.yml declares {{server_number}} as a variable of with_items. | |
After that, using the original {{ item }} by using {{ server_number }} in env/servers-1-10/main.yml that was included. | |
% tree roles/zabbix-server-host (zabbix-ansible) RyonoMac-mini | |
. | |
├── env | |
│ ├── servers-1-10 | |
│ │ ├── main.yml | |
│ │ ├── www1.yml | |
│ │ ├── wwwN.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws cloudfront create-invalidation --distribution-id <distribution ID> --paths '/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##variables.tf | |
variable "env" { } | |
variable "ec2_config" { | |
default = { | |
ami = "ami-4af5022c" | |
instance_type = "t2.micro" | |
instance_key = "id_rsa" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"subnet_public_a_config": default may not contain interpolations | |
It is a way to avoid errors like | |
#-------------------------------------------------------- | |
# variables | |
#-------------------------------------------------------- | |
variable "vpc_config" { | |
default = { | |
cidr_block = "12.0.0.0/16" | |
instance_tenancy = "default" | |
enable_dns_support = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% terraform init -upgrade env/stg (terraform-stg) RyonoMac-mini | |
Initializing the backend... | |
Initializing provider plugins... | |
- Checking for available provider plugins on https://releases.hashicorp.com... | |
- Downloading plugin for provider "aws" (1.7.1)... | |
The following providers do not have any version constraints in configuration, | |
so the latest version was installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_security_group" "infra" { | |
name = "infra" | |
description = "infra SSH" | |
vpc_id = "${aws_vpc.xxx_vpc.id}" | |
ingress { | |
from_port = 22 | |
to_port = 22 | |
protocol = "tcp" | |
cidr_blocks = ["xxx.xxx.xxx.xx/xx"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_security_group" "infra" { | |
name = "infra" | |
description = "infra SSH" | |
vpc_id = "${aws_vpc.xxx_vpc.id}" | |
ingress { | |
from_port = 22 | |
to_port = 22 | |
protocol = "tcp" | |
cidr_blocks = ["xxx.xxx.xxx.xx/xx"] |
OlderNewer