Wednesday, August 21, 2019

Using private pem file to execute ansible commands

ansible masters -m shell -a "pwd" --private-key=/home/ec2-user/openshift-aws-installer-image/ck_workshop.pem -u ec2-user
 
ansible masters -m shell -a 'subscription-manager register --username=cjonagam --password=Earth@1010' --private-key=/home/ec2-user/openshift-aws-installer-image/ck_workshop.pem  -su --su-user=ec2-user -u ec2-user
 
 
General ssh command to connect using private key:
 
ssh -i "uday.pem" ec2-user@13.235.187.252 
 
 
 
Reference 

No comments:

Post a Comment