Skip to content

Instantly share code, notes, and snippets.

View iamgini's full-sized avatar
⚙️
#learningeveryday

Gineesh Madapparambath iamgini

⚙️
#learningeveryday
View GitHub Profile
@iamgini
iamgini / ansible-summary.md
Created May 20, 2018 12:54 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

# Version 2.0.0 - net.gini@gmail.com
import os
import socket
import subprocess, shlex
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
[root@ansible-box ansible]# ansible all --list-hosts
hosts (4):
db101.techbeatly.com
localhost
servera.techbeatly.coms
serverb.techbeatly.com
[root@ansible-box ansible]# ansible intranetweb --list-hosts
hosts (2):
servera.techbeatly.com
[root@ansible-box ansible]# ansible --version
ansible 2.5.3
config file = /root/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
[root@ams-bkp-101 Unix]# ls -lrta
total 160
-rwx------. 1 root root 52 Mar 12 03:16 cvpkgseed
-rwx------. 1 root root 52 Mar 12 03:16 support
-rwx------. 1 root root 10 Mar 20 01:00 pkg.xml.description
-rwx------. 1 root root 80514 Mar 20 01:00 pkg.xml
-rwx------. 1 root root 118 Mar 20 01:00 version
-rwx------. 1 root root 132 Mar 20 01:00 silent_install
-rwx------. 1 root root 47053 Mar 20 01:00 detect
-rwx------. 1 root root 132 Mar 20 01:00 cvpkgadd
[root@ams-bkp-101 Unix]# ./cvpkgadd
Using update installer /root/.gxsetup/cvpkgadd/newinstall:
- unzipped from /bkp/Unix/linux-x8664/LooseUpdates/Updates/linux-x8664_11.0.0B80-SP10_SP10-HotFix-2166/linux-glibc2.3-x86_64/installer/nwinstall.gz
- v1180792 15488KB gzipped at XBuildNJ11 on 18-02-09 11:56:57 by pbuilder
Preparing .. READY.
EXTRACT_DIR = /root/.gxsetup/cvpkgadd
[root@ams-bkp-101 Unix]# simpana status
--------------------------------- Instance001 ---------------------------------
[ General ]
Version = 11(BUILD80) SP10
CommServe = ams-comserv-102.example.com
Home Directory = /opt/simpana/commvault/Base
Log Directory = /var/log/commvault/Log_Files
Core Directory = /opt/simpana/commvault
Temp Directory = /opt/simpana/commvault/Base/Temp
Platform Type = 4
[root@ams-srv-101 Unix]# fdisk -l /dev/sdc
Disk /dev/sdc: 3599.5 GB, 3599451029504 bytes, 7030177792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
[root@ams-srv-101 Unix]# parted /dev/sdc
GNU Parted 3.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
(parted) print
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdc: 3599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags