mirror of
https://github.com/geerlingguy/ansible-for-devops.git
synced 2024-05-19 06:50:03 +00:00
24 lines
486 B
Python
24 lines
486 B
Python
# Ansible custom 'blue' test plugin definition.
|
|
|
|
def is_blue(string):
|
|
''' Return True if a valid CSS value of 'blue'. '''
|
|
blue_values = [
|
|
'blue',
|
|
'#0000ff',
|
|
'#00f',
|
|
'rgb(0,0,255)',
|
|
'rgb(0%,0%,100%)',
|
|
]
|
|
if string in blue_values:
|
|
return True
|
|
else:
|
|
return False
|
|
|
|
class TestModule(object):
|
|
''' Return dict of custom jinja tests. '''
|
|
|
|
def tests(self):
|
|
return {
|
|
'blue': is_blue
|
|
}
|