sudo apt-get install python-dev
sudo pip install boto virtualenvwrapper
mkvirtualenv databus
pip install ansible
pip install awscli
workon databus
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i localhost, create-infra.yml --extra-vars "vpc_name=ubp-lab4 env_name=dev ansible_python_interpreter=python"
Note: public subnets will not have auto-assign public IP set since Ansible module ec2_vpc_subnet does not support it.
EC2_INI_PATH=./inventory/ec2-inventory.ini ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ./inventory/ec2-inventory.py install-docker.yml
EC2_INI_PATH=./inventory/ec2-inventory.ini ansible-playbook -i ./inventory/ec2-inventory.py deploy-services.yml
- Delete instances (filter by project name)
- Delete security groups (filter by project name)
- Delete VPC (filter by project name)
.
├── build_env.yml -> an individual play
├── group_vars
│ └── all.yml -> default values global for all groups and roles
├── roles
│ └── create-vpc
│ ├── tasks
│ │ └── main.yml -> tasks for this role
│ └── vars
│ └── main.yml -> role specific variables
└── site.yml -> playbook including all individual plays