码迷,mamicode.com
首页 > 其他好文 > 详细

临时3

时间:2018-03-01 13:26:45      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:class   not   with   etc   rac   file   hat   root   test   

  

- name : auto_oracle_as_root
remote_user: root
hosts: localhost
vars:
epic: true
tasks:
- name: add_group_oinstall
group:
name={{ item }}
state=present
with_items:
- oinstall
- dba

- name: add user
user:
name=oracle
group=oinstall
groups=dba
home=/home/oracle
uid=700
password={{ password }}

- name: test os
shell: echo "only on Red Hat 6, derivatives, and later"
when: ansible_os_family == "Centos"

- name: test epic
shell: echo "This certainly is epic!"
when: epic

- name: test not epic
shell: echo "This certainly is not epic!"
when: not epic

- name: modify /etc/security/limits.conf
lineinfile:
path=/etc/security/limits.conf
line={{item}}
state=present
with_items:
- ‘oracle soft nproc 2047‘
- ‘oracle hard nproc 16384‘
- ‘oracle soft nofile 1024‘
- ‘oracle hard nofile 65536‘

- name: run some shell command
command: echo {{ item }}
with_items: [0,1,2,3,4,5,6,7]
when: item > 5

临时3

标签:class   not   with   etc   rac   file   hat   root   test   

原文地址:https://www.cnblogs.com/wuxie1989/p/8487787.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!