- Add the function below to your
.zshrc
file And ModifyTHIS_REPO_LOCATION
to your own location.
function ops {
cd THIS_REPO_LOCATION && make bash PROFILE=${1:-default}
}
- Clone your
playbook
repo intowork
directory. - Use command
ops
to enter container and then do what you want with Ansible and Aws CLI
- AWS CLI command shortcuts located in the file
home/.mybashrc
, and you can modify freely. - command shortcut
ec2
list all running ec2 instances in current location. - command shortcut
ssm
with ec2 instance id as parameter to connect to ec2 instance.
- use internal command
senv YOUR_PROFILE_NAME
to change profile. senv --region SPECIFIED_REGION
to change current region.- Named profiles for the AWS CLI are located in
~/.aws
.