Add seed parameter to random_mac filter (#51841)

This commit is contained in:
s-hamann
2019-05-16 17:41:08 +00:00
committed by Nathaniel Case
parent a910d19533
commit 730456b402
3 changed files with 17 additions and 3 deletions

View File

@@ -242,6 +242,12 @@
- "'00:00:00:00:00' | random_mac is match('^00:00:00:00:00:[a-f0-9][a-f0-9]$')"
- "'00:00:00' | random_mac != '00:00:00' | random_mac"
- name: Verify random_mac filter with seed
assert:
that:
- "'00:00:00' | random_mac(seed='test') == '00:00:00' | random_mac(seed='test')"
- "'00:00:00' | random_mac(seed='test') != '00:00:00' | random_mac(seed='another_test')"
- name: Verify that union can be chained
vars:
unions: '{{ [1,2,3]|union([4,5])|union([6,7]) }}'