golden hour
/lib/python3.9/site-packages/ansible/plugins/filter
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
510 B
Del
OK
__pycache__
-
Del
OK
b64decode.yml
927 B
Del
OK
b64encode.yml
543 B
Del
OK
basename.yml
809 B
Del
OK
bool.yml
631 B
Del
OK
checksum.yml
524 B
Del
OK
combinations.yml
780 B
Del
OK
combine.yml
1.63 KB
Del
OK
comment.yml
2.09 KB
Del
OK
core.py
21.05 KB
Del
OK
dict2items.yml
1.28 KB
Del
OK
difference.yml
1024 B
Del
OK
dirname.yml
820 B
Del
OK
encryption.py
2.63 KB
Del
OK
expanduser.yml
506 B
Del
OK
expandvars.yml
569 B
Del
OK
extract.yml
1.34 KB
Del
OK
fileglob.yml
589 B
Del
OK
flatten.yml
846 B
Del
OK
from_json.yml
905 B
Del
OK
from_yaml.yml
959 B
Del
OK
from_yaml_all.yml
1.25 KB
Del
OK
hash.yml
861 B
Del
OK
human_readable.yml
993 B
Del
OK
human_to_bytes.yml
1.02 KB
Del
OK
intersect.yml
969 B
Del
OK
items2dict.yml
1.52 KB
Del
OK
log.yml
904 B
Del
OK
mandatory.yml
537 B
Del
OK
mathstuff.py
8.12 KB
Del
OK
md5.yml
709 B
Del
OK
password_hash.yml
1.09 KB
Del
OK
path_join.yml
846 B
Del
OK
permutations.yml
969 B
Del
OK
pow.yml
692 B
Del
OK
product.yml
1.87 KB
Del
OK
quote.yml
492 B
Del
OK
random.yml
1.16 KB
Del
OK
realpath.yml
546 B
Del
OK
regex_escape.yml
688 B
Del
OK
regex_findall.yml
1.12 KB
Del
OK
regex_replace.yml
1.47 KB
Del
OK
regex_search.yml
1.04 KB
Del
OK
rekey_on_member.yml
921 B
Del
OK
relpath.yml
758 B
Del
OK
root.yml
618 B
Del
OK
sha1.yml
729 B
Del
OK
shuffle.yml
685 B
Del
OK
split.yml
833 B
Del
OK
splitext.yml
746 B
Del
OK
strftime.yml
1.33 KB
Del
OK
subelements.yml
1.4 KB
Del
OK
symmetric_difference.yml
1 KB
Del
OK
ternary.yml
1.52 KB
Del
OK
to_datetime.yml
1.58 KB
Del
OK
to_json.yml
2.69 KB
Del
OK
to_nice_json.yml
2.21 KB
Del
OK
to_nice_yaml.yml
1.55 KB
Del
OK
to_uuid.yml
785 B
Del
OK
to_yaml.yml
1.64 KB
Del
OK
type_debug.yml
508 B
Del
OK
union.yml
954 B
Del
OK
unique.yml
839 B
Del
OK
unvault.yml
1.04 KB
Del
OK
urldecode.yml
1.53 KB
Del
OK
urls.py
508 B
Del
OK
urlsplit.py
2.56 KB
Del
OK
vault.yml
1.63 KB
Del
OK
win_basename.yml
673 B
Del
OK
win_dirname.yml
679 B
Del
OK
win_splitdrive.yml
819 B
Del
OK
zip.yml
1.32 KB
Del
OK
zip_longest.yml
1.23 KB
Del
OK
Edit: ternary.yml
DOCUMENTATION: name: ternary author: Brian Coca (@bcoca) version_added: '1.9' short_description: Ternary operation filter description: - Return the first value if the input is C(True), the second if C(False). positional: true_val, false_val options: _input: description: A boolean expression, must evaluate to C(True) or C(False). type: bool required: true true_val: description: Value to return if the input is C(True). type: any required: true false_val: description: Value to return if the input is C(False). type: any none_val: description: Value to return if the input is C(None). If not set, C(None) will be treated as C(False). type: any version_added: '2.8' notes: - Vars as values are evaluated even when not returned. This is due to them being evaluated before being passed into the filter. EXAMPLES: | # set first 10 volumes rw, rest as dp volume_mode: "{{ (item|int < 11)|ternary('rw', 'dp') }}" # choose correct vpc subnet id, note that vars as values are evaluated even if not returned vpc_subnet_id: "{{ (ec2_subnet_type == 'public') | ternary(ec2_vpc_public_subnet_id, ec2_vpc_private_subnet_id) }}" - name: service-foo, use systemd module unless upstart is present, then use old service module service: state: restarted enabled: yes use: "{{ (ansible_service_mgr == 'upstart') | ternary('service', 'systemd') }}" RETURN: _value: description: The value indicated by the input. type: any
Save