Professional Documents
Culture Documents
ANSIBLE:-
Ansible:
------------------
Infrastructure prof
Infrastructure conf
Infrastructure manage
IAAC - infrastructure as a code
Specialist in infra config
programming language using here is yaml {yet another markup language} & Unix
commands via infra configure
Ansible released by REDHAT
ON premisses / Cloud
Matured tool {2006}65%
TERRAFORM:
-------------------------
Specialist in infra provisioning
programming language using here is => Hasicorp Configuration Language {HCL}
it can also do configuration and maintenance
Terraform released by Hasicorp
Cloud
NEW
Define Configuration?
Application Deployment
Tools & software Installation
Doing changes in Existing application
Using Unix/ymal script via doing task like create dir, file trans, permission
change
Ansible Limitations?
Ansible master won't run in Windows server
Single master configuration. single master control multi slave. if master server
spoil means entire project setup will spoil.
Very Easy to Learn and implement
Master and Slave configuration Ansible is also called Agent less Architecture.
In master and slave conf. we do conf / grouping slave server IP ADD in master
server.
In Host Inventory, we create host inventory under the master server.
download "pageant" file from putty organisation. used for .ppk file repo. while
login via pagent
Ansible mechanism -> what ever we need to achive on the slave server we do push
master and it will happens in the slaves server
2, yum/apt
Automatic installation method
while install ansible via yum/apt method Ansible Default file system path
"/etc/ansible" created
while path created automatic means, ansible default file "Host Inventory, Ansible
Configuration file available
Ansible main important Components:-
Adhoc Commands - single task exec commands
Playbooks - muli task
Vault - Security Policy - ie setting password
Roles - Offline Template - we store already used playbooks in ansible galaxy for re
use purpose.
OPEN PAGEANT application and load both master and slave servers key files
vi hosts -> create hosts file -> copy paste slave's pvt IP ADD -> also can
create group different groups [] for slaves to install different softwares
wget https://raw.githubusercontent.com/ansible/ansible/stable-2.11/examples/
ansible.cfg
*****we do ansible in ec2-user onlt. Technically ROOT user we can say Emergency ID.
we can't do proj in root. bcoz cost applicable.
*** read wright execute policy available for homeuser path.
*****open cofiguration file link & choose DEVELOPED VERSION "STABLE 2.11"
******open that window via RAW file and do "wget"
ls -lrth
vi ansible.cfg
---> Host key checking = False ****{make it as command}
****whenever master connect with host it should not ask confirmation. we dissable
host key checking.
ansible all -i hosts -m ping **** ping all the slave servers from master
ansible all -i hosts -a "date"
ansible all -i hosts -a "yum install git -y"
ansible all -i hosts -a "yum install git -y" -b
KMS:-
Create IAM Role:
Username -> access key -> AdministratorAccess
KMS Console:
Symetric -> Encrypt and Decrypt
Alias - name
Key Administrator -> {username}