limits.conf with ansible

[root@localhost ~]# ansible-galaxy init limits.conf – limits.conf was created successfully [root@localhost ~]# ansible-doc pam_limits [root@localhost ~]# vim limits.conf/tasks/main.yml — # tasks file for limits.conf – pam_limits: domain: “{{ item.domain }}” limit_type: “{{ item.limit_type }}” limit_item: “{{ item.limit_item }}” value: “{{ item.value }}” with_items: “{{ limits_conf_settings }}” [root@localhost ~]# vim limits_conf.yml — – hosts: all roles: […]

Read more
Ansible summary

# An Ansible summary # Configuration file [intro\_configuration.html](http://docs.ansible.com/intro_configuration.html) First one found from of * Contents of `$ANSIBLE_CONFIG` * `./ansible.cfg` * `~/.ansible.cfg` * `/etc/ansible/ansible.cfg` Configuration settings can be overridden by environment variables – see constants.py in the source tree for names. # Patterns [intro\_patterns.html](http://docs.ansible.com/intro_patterns.html) Used on the `ansible` command line, or in playbooks. * `all` (or […]

Read more
how to use sysctl with ansible

[root@localhost ~]# sysctl -a |grep vm.swappiness vm.swappiness = 30 [root@localhost ~]# ansible-galaxy init sysctl – sysctl was created successfully [root@localhost ~]# ansible-doc sysctl [root@localhost ~]# vim test.yml — – hosts: localhost roles: – sysctl vars: sysctl_settings: – name: vm.swappiness value: 90 [root@localhost ~]# vim sysctl/tasks/main.yml — # tasks file for sysctl – name: sysctl settings […]

Read more
ansible-playbooks one of the following is required name list

Ansible implementation of one of the following is required: name,list Perform playbooks [root@controller playbook]# ansible-playbook package.yaml Error message [root@controller playbook]# ansible-playbook package.yaml [WARNING]: While constructing a mapping from /root/ansible/playbook/package.yaml, line 11, column 5, found a duplicate dict key (name). Using last defined value only. [WARNING]: Ignoring invalid attribute: state PLAY [app] **************************************************************************************************************************************************************************************************************************************************************** TASK [Gathering Facts] […]

Read more
MYSQL BINARY INSTALL CENTOS7

Environment: Virtual Machine + CentOS 7 1. download binary package, the following mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz link is the official website cd /usr/local/src wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz 2. extract, rename [root@beta src]# tar zxvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz [root@beta src]# ls index.html?id=471614 mysql-5.7.19-linux-glibc2.12-x86_64 mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz [root@beta src]# mv mysql-5.7.19-linux-glibc2.12-x86_64 /usr/local/mysql 3. Initialize [root@beta mysql]# useradd -M -s /sbin/nologin mysql [root@beta mysql]# ls bin COPYING […]

Read more
RHEL / CentOS 7 Network Teaming

RHEL / CentOS 7 Network Teaming Below is an example on how to configure network teaming on RHEL/CentOS 7. It is assumed that you have at least two interface cards. Show Current Network Interfaces [root@rhce-server ~]$ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno16777736: […]

Read more
oracle rman backup

How to sync standby database which is lagging behind from primary database Primary Database cluster: cluster1.rmohan.com Standby Database cluster: cluster2.rmohan.com Primary Database: prim Standby database: stand Database version:11.2.0.1.0 Reason:- 1. Might be due to the network outage between the primary and the standby database leading to the archive gaps. Data guard would be able to […]

Read more
centos 7 cluster

[root@clusterserver1 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.20 clusterserver1.rmohan.com clusterserver1 192.168.1.21 clusterserver2.rmohan.com clusterserver2 192.168.1.22 clusterserver3.rmohan.com clusterserver3 perl -pi.orig -e ‘s/SELINUX=enforcing/SELINUX=permissive/g’ /etc/selinux/config setenforce 0 timedatectl status yum install -y ntp systemctl enable ntpd ; systemctl start ntpd run ssh-keygen [root@clusterserver1 ~]# ssh-keygen Generating public/private rsa key pair. Enter file […]

Read more
nginx is a high performance

nginx is a high performance web server software. It is a much more flexible and lightweight program than apache. yum install epel-release yum install nginx ifconfig eth0 | grep inet | awk ‘{ print $2 }’ wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz” wget http://mirror.nus.edu.sg/apache/tomcat/tomcat-8/v8.0.30/bin/apache-tomcat-8.0.30.tar.gz tar xzf jdk-8u40-linux-i586.tar.gz mkdir /usr/java/ cd /usr/java/jdk1.8.0_40/ [root@cluster1 java]# […]

Read more
RHEL -7 Notes

study notes 2 — command line file 1, create and delete files Create a file touch xxxx touch -t 20151225 create a file and specify time properties rm xxx delete the file rm -rf forced to delete files 2. Create a directory and delete the directory mkdir -p xxx/yyy recursively create directories; rmdir xxx delete […]

Read more

Hit Counter provided by dental implants orange county