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:
14
test-plugin/test_plugins/blue.py
Normal file
14
test-plugin/test_plugins/blue.py
Normal 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)
|
Reference in New Issue
Block a user