【发布时间】:2017-09-02 06:10:46
【问题描述】:
---
- name: Oracle DB Prereqs
hosts: sandbox
become: true
gather_facts: yes
vars:
shmall_ent: 16384
shmall_mid: 32768
shmall_lar: 65536
shmall_exlar: 262144
tasks:
- name: SHMALL value to set for memory size less than 16G
when: ansible_memtotal_mb <= {{ shmall_ent }}
notify:
- SHMALL ent
- name: SHMALL value to set for memory size between 16G and 32G
when: (ansible_memtotal_mb > {{ shmall_ent }} and ansible_memtotal_mb <= {{ shmall_mid }})|int
notify:
- SHMALL mid
- name: SHMALL value to set for memory size between 32G and 64G
when: (ansible_memtotal_mb > {{ shmall_mid }} and ansible_memtotal_mb <= {{ shmall_lar }})|int
notify:
- SHMALL lar
- name: SHMALL value to set for memory size between 64G and 256G
when: (ansible_memtotal_mb > {{ shmall_lar }} and ansible_memtotal_mb <= {{ shmall_exlar }})|int
notify:
- SHMALL exlar
handlers:
- name: SHMALL ent
sysctl:
name: kernel.shmall
value: 3670016
sysctl_file: /etc/sysctl.d/99-sysctl.conf
- name: SHMALL mid
sysctl:
name: kernel.shmall
value: 7340032
sysctl_file: /etc/sysctl.d/99-sysctl.conf
- name: SHMALL lar
sysctl:
name: kernel.shmall
value: 14680064
sysctl_file: /etc/sysctl.d/99-sysctl.conf
- name: SHMALL exlar
sysctl:
name: kernel.shmall
value: 57671680
sysctl_file: /etc/sysctl.d/99-sysctl.conf
运行播放时出错是:
ERROR! Syntax Error while loading YAML.
The error appears to have been in '/home/rjoy/ansible/roles/oracle/playbook/oraunix.yml': line 12, column 4, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
^ here
【问题讨论】:
标签: linux unix ansible redhat devops