Commit Graph

16 Commits (5ea414422bd5571d2c779a68ae5d8f5054ed1649)

Author SHA1 Message Date
Olivier Bourdon 06b73ff8f1 Add random_mac string filter (#39775)
Add new filter to generate random MAC addresses from
string prefix. See docs/docsite/rst/user_guide/playbooks_filters.rst
for more detailed infos.
6 years ago
Jordan Borean fc210a4584
base64 filter: Added ability to specify encoding (#39714)
* base64 filter: Added ability to specify encoding

* Added unicode chars for further testing

* Removed errors to keep previous behaviour in place

* Removed surrogate pairs due to issues loading YAML in CI
6 years ago
Brian Coca 2b7799f817
added flatten filter (#33102)
* added flatten filter
7 years ago
Matt Martz 4fe08441be Deprecate tests used as filters (#32361)
* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
7 years ago
Matt Clay 781fd7099a Reorganize integration tests:
- Move legacy tests into a separate directory.
- Reduce common dependencies between targets.
7 years ago
Sam Doran 80c00d3238 Create urlsplit filter (#28537)
* Improve tests for uri filter

* Create URL Split docs

* Add urlsplit filter

* Py3 compatibility

* Use helper method and eliminate query options

* Add options, cleanup output, fix tests

* Update docs

* Add parenthesis to boilerplate import

* Add debug task to tests

* Use exclude option to filter returned values

* Filter out additional option for Python 3
7 years ago
Adrian Likins 01c0b2f714 Handle errors in jmespath in json_query better (#22109)
* Handle errors in jmespath in json_query better

Catch any exceptions raised from jmespath and raise
an AnsibleFilterError instead.

Avoid a traceback.

Fixes #20379

* pep8
7 years ago
Andrea Tartaglia 0d48732e7e Integration tests requirements (#26545)
* Removed pexpect and jmespath requirement, install it in task directly
* Removed passlib dependency
7 years ago
Toshio Kuratomi 99fd2328af Fix hash filter for non-ascii strings and Python3
hashlib hashes operate on byte strings.  When given a text string on
Python3, hashlib backtraces.  When given a text string on Python2,
hashlib will backtrace if the string contains non-ascii characters.
Encode the text string to utf-8 prior to hashing to avoid this problem.

Fixes #21452
8 years ago
Matt Clay a8fb6f0958 Use jinja2 import instead of pip to get version.
This resolves issues with older versions of pip.
8 years ago
Matt Clay ad65274643 Only test map on jinja2 >= 2.7 8 years ago
Toshio Kuratomi 32fbd4ba24 Test the extract filter without the map filter.
map + extract is the usual way to use it but map isn't available on
older versions of jinja2 that we still work with.  Test extract even on
those versions.
8 years ago
Matt Clay 6bbd92e422 Initial ansible-test implementation. (#18556) 8 years ago
Adrien Vergé 0e834fc9e4 Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.

Since key duplication problems were removed in 4d48711, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
8 years ago
Adrian Likins f99ffb5620 Fix test_filters fail because of dict sort (#18105)
Fixes #17308
8 years ago
Matt Clay 75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 8 years ago