ansible的tests

Ansible的tests : 路径 /usr/lib/python2.7/site-packages/ansible/plugins/test

core.py

            # failure testing
            'failed': failed,
            'failure': failed,
            'succeeded': success,
            'success': success,

            # changed testing
            'changed': changed,
            'change': changed,

            # skip testing
            'skipped': skipped,
            'skip': skipped,

            # regex
            'match': match,
            'search': search,
            'regex': regex,

            # version comparison
            'version_compare': version_compare,

            # lists
            'any': any,
            'all': all,
    

 file.py

        # file testing
            'is_dir': isdir,
            'is_file': isfile,
            'is_link': islink,
            'exists': exists,
            'link_exists': lexists,

            # path testing
            'is_abs': isabs,
            'is_same_file': samefile,
            'is_mount': ismount,

mathstuff.py

            # set theory
            'issubset': issubset,
            'issuperset': issuperset,
            'isnan': isnotanumber,

jinjia2 tests 路径/usr/lib/python2.7/site-packages/jinja2/tests.py

    'odd':              test_odd,
    'even':             test_even,
    'divisibleby':      test_divisibleby,
    'defined':          test_defined,
    'undefined':        test_undefined,
    'none':             test_none,
    'lower':            test_lower,
    'upper':            test_upper,
    'string':           test_string,
    'mapping':          test_mapping,
    'number':           test_number,
    'sequence':         test_sequence,
    'iterable':         test_iterable,
    'callable':         test_callable,
    'sameas':           test_sameas,
    'escaped':          test_escaped

 

posted @ 2018-05-08 13:02  ishmaelwanglin  阅读(430)  评论(0编辑  收藏  举报