Saturday, July 9, 2016
Ansible post install
ansible --version
ansible-playbook --version
ansible-galaxy --version
Now , we have the Ansible installed
Now we need the inventory
The inventory file needs to be managed by ansible
Every change to the inventory file should be able to be tracked
we can have this inventory file anywhere
Lets say that , the inventory file is in our home directory by the name dev
The inventories are grouped by their function and the name of the Function being their role/Function
Now we know that their role/Function is what the group name is , it is easier to track the hosts in the Inventory
As we know the name of the file dev
executing this command
ansible --list-hosts all , will check the list of the hosts from the Default system inventory which is
/etc/ansible/hosts
If we want to display the names of the hosts from a particular locaiton in the inventory , then we do tha following
We source in the name of the inventory file from the location where it is
ansible -i filename --list-hosts all
This will display the hosts that are in the filename
COMMANDS:
ansible --list-hosts all and ansible -i filename --list-hosts all
ansible-playbook --version
ansible-galaxy --version
Now , we have the Ansible installed
Now we need the inventory
The inventory file needs to be managed by ansible
Every change to the inventory file should be able to be tracked
we can have this inventory file anywhere
Lets say that , the inventory file is in our home directory by the name dev
The inventories are grouped by their function and the name of the Function being their role/Function
Now we know that their role/Function is what the group name is , it is easier to track the hosts in the Inventory
As we know the name of the file dev
executing this command
ansible --list-hosts all , will check the list of the hosts from the Default system inventory which is
/etc/ansible/hosts
If we want to display the names of the hosts from a particular locaiton in the inventory , then we do tha following
We source in the name of the inventory file from the location where it is
ansible -i filename --list-hosts all
This will display the hosts that are in the filename
COMMANDS:
ansible --list-hosts all and ansible -i filename --list-hosts all
Tuesday, July 5, 2016
Installation Commands on Cent OS
402 yum update
403 yum -y install python-pip
404 curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
405 yum -y install python-pip
406 python get-pip.py
407 pip -V
408 id
409 pwd
410 docker ps
411 docker ps -a
412 id
413 pwd
414 pip -V
415 id
416 su -
417 cd
418 hostname
419 docker ps
420 docker ps -a
421 pip -V
422 yum install ansible
423 yum update
424 which ansible
425 yum install ansible
426 sudo apt-get update
427 sudo yum update
428 id
429 su -
430 id
431 pwd
432 bash
433 bash
434 docker ps
435 pwd
436 cd docker
437 ls
438 ls -ltra
439 cd ..
440 pwd
441 cd python
442 ls
443 ls -ltra
444 more getCpu_count.py
445 ls
446 id
447 pwd
448 ansible
449 ansible -v
450 ulimit -a
451 ulimit
452 sudo launchctl limit maxfiles unlimited
453 launchctl
454 launch
455 ulimit
456 ulimit -help
457 ulimit -maxfiles
458 ulimit - maxfiles
459 ulimit
460 ulimit -a
461 pwd
462 cd ..
463 ls
464 mkdir ansible
465 cd ansible/
466 git clone git://github.com/ansible/ansible.git --recursive
467 id
468 su -
469 cd /opt
470 docker ps
471 id
472 pwd
473 cd /opt/apps
474 ls
475 bash
476 bash
477 pwd
478 ls
479 cd
480 ls
481 hostname
482 pwd
483 ls
484 cd
485 cd /opt/apps
486 ls
487 cd ansible/
488 ls
489 cd ansible/
490 ls
491 cd ..
492 ls
493 pwd
494 ls
495 git clone git://github.com/ansible/ansible.git --recursive
496 mv ansible/ ansible.o
497 git clone git://github.com/ansible/ansible.git --recursive
498 ifconfig -a | grep inet
499 ifconfig -a
500 id
501 pwd
502 nslookup
503 which nslookup
504 yum install nslookup
505 id
506 pwd
507 id
508 pwd
509 nslookup dns
510 nslookup dns.example.com
511 cd /etc/
512 vi resolv.conf
513 pwd
514 ls
515 ls 0ltra
516 ls -ltra
517 ls -ltra | resolv.conf
518 ls -ltra resolv.conf
519 date
520 which ansible
521 history
522 pwd
523 cd /var/tmp
524 history > history_file
403 yum -y install python-pip
404 curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
405 yum -y install python-pip
406 python get-pip.py
407 pip -V
408 id
409 pwd
410 docker ps
411 docker ps -a
412 id
413 pwd
414 pip -V
415 id
416 su -
417 cd
418 hostname
419 docker ps
420 docker ps -a
421 pip -V
422 yum install ansible
423 yum update
424 which ansible
425 yum install ansible
426 sudo apt-get update
427 sudo yum update
428 id
429 su -
430 id
431 pwd
432 bash
433 bash
434 docker ps
435 pwd
436 cd docker
437 ls
438 ls -ltra
439 cd ..
440 pwd
441 cd python
442 ls
443 ls -ltra
444 more getCpu_count.py
445 ls
446 id
447 pwd
448 ansible
449 ansible -v
450 ulimit -a
451 ulimit
452 sudo launchctl limit maxfiles unlimited
453 launchctl
454 launch
455 ulimit
456 ulimit -help
457 ulimit -maxfiles
458 ulimit - maxfiles
459 ulimit
460 ulimit -a
461 pwd
462 cd ..
463 ls
464 mkdir ansible
465 cd ansible/
466 git clone git://github.com/ansible/ansible.git --recursive
467 id
468 su -
469 cd /opt
470 docker ps
471 id
472 pwd
473 cd /opt/apps
474 ls
475 bash
476 bash
477 pwd
478 ls
479 cd
480 ls
481 hostname
482 pwd
483 ls
484 cd
485 cd /opt/apps
486 ls
487 cd ansible/
488 ls
489 cd ansible/
490 ls
491 cd ..
492 ls
493 pwd
494 ls
495 git clone git://github.com/ansible/ansible.git --recursive
496 mv ansible/ ansible.o
497 git clone git://github.com/ansible/ansible.git --recursive
498 ifconfig -a | grep inet
499 ifconfig -a
500 id
501 pwd
502 nslookup
503 which nslookup
504 yum install nslookup
505 id
506 pwd
507 id
508 pwd
509 nslookup dns
510 nslookup dns.example.com
511 cd /etc/
512 vi resolv.conf
513 pwd
514 ls
515 ls 0ltra
516 ls -ltra
517 ls -ltra | resolv.conf
518 ls -ltra resolv.conf
519 date
520 which ansible
521 history
522 pwd
523 cd /var/tmp
524 history > history_file
Ansible Tut1
The Following are the steps , that we need to follow to install ansible on OSX
1) Check ulimit -n
They should be unlimited
2) sudo easy_install pip
pip gets installed , which is a package manager
3) Ansible is a python Application
Packages available through package repo
4)sudo pip install ansible
Now Install ANSIBLE using pip , which is a python package manager
5) Ansible uses Native OPEN SSH for communication
6) Using Open SSH enables Control Persist - which is a performance feature , Kerberos and options in ~/.ssh/config such as Jump Host setup
1) Check ulimit -n
They should be unlimited
2) sudo easy_install pip
pip gets installed , which is a package manager
3) Ansible is a python Application
Packages available through package repo
4)sudo pip install ansible
Now Install ANSIBLE using pip , which is a python package manager
5) Ansible uses Native OPEN SSH for communication
6) Using Open SSH enables Control Persist - which is a performance feature , Kerberos and options in ~/.ssh/config such as Jump Host setup
Subscribe to:
Comments (Atom)