tripleo-validations/validations/undercloud-ram.yaml
Florian Fuchs c16a61649c Remove syntax warnings for when statements
Ansible>=2.3.0 will output warnings if `when` statements contain jinja2
templating delimiters such as curly braces (the playbooks are executing
fine, despite the warnings).

This patch changes these statements to use the correct syntax as
suggested in the docs.

Change-Id: I58657253bdc46e90eec6dea7ea5e07a2bf6c466e
Closes-Bug: #1721213
2017-10-04 13:16:48 +02:00

20 lines
780 B
YAML

---
- hosts: undercloud
vars:
metadata:
name: Verify the undercloud fits the RAM requirements
description: >
Verify that the undercloud has enough RAM.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Undercloud_Requirements.html
groups:
- prep
- pre-introspection
- pre-upgrade
min_undercloud_ram_gb: 16
tasks:
- name: Verify the RAM requirements
fail: msg="The RAM on the undercloud node is {{ ansible_memtotal_mb }} MB, the minimal recommended value is {{ min_undercloud_ram_gb|int * 1024 }} MB."
# NOTE(shadower): converting GB to MB
failed_when: "(ansible_memtotal_mb) < min_undercloud_ram_gb|int * 1024"