1
0
mirror of https://github.com/geerlingguy/ansible-for-devops.git synced 2024-05-19 06:50:03 +00:00

Issue #202: Add 'blue' test plugin for chapter 7.

This commit is contained in:
Jeff Geerling
2020-06-14 14:14:24 -05:00
parent 1475f1dcad
commit 11ca62bb00
6 changed files with 43 additions and 8 deletions

View File

@ -0,0 +1,14 @@
# blue Ansible test plugin definition.
def is_blue(string):
blue_values = ['blue', '#0000ff', '#00f', 'rgb(0,0,255)']
if string in blue_values:
return True
else:
return False
class TestModule(object):
''' custom playbook jinja2 tests '''
def tests(self):
return dict(blue=is_blue)