- Add the function below to your
.zshrcfile And ModifyTHIS_REPO_LOCATIONto your own location.
function ops {
cd THIS_REPO_LOCATION && make bash PROFILE=${1:-default}
}- Clone your
playbookrepo intoworkdirectory. - Use command
opsto 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
ec2list all running ec2 instances in current location. - command shortcut
ssmwith ec2 instance id as parameter to connect to ec2 instance.
- use internal command
senv YOUR_PROFILE_NAMEto change profile. senv --region SPECIFIED_REGIONto change current region.- Named profiles for the AWS CLI are located in
~/.aws.