summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/targets/vyos_config/tests/cli/check_config.yaml34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_config/tests/cli/check_config.yaml b/tests/integration/targets/vyos_config/tests/cli/check_config.yaml
index 8e2e8372..83a62197 100644
--- a/tests/integration/targets/vyos_config/tests/cli/check_config.yaml
+++ b/tests/integration/targets/vyos_config/tests/cli/check_config.yaml
@@ -49,9 +49,43 @@
- set system login user esa authentication encrypted-password '!abc!'
- set system login user vyos full-name 'VyOS admin'
- set system login user vyos authentication encrypted-password 'abc'
+ - set system login user john full-name 'John'
+ - set system login user john authentication plaintext-password 'xyz'
- assert:
that:
- result.filtered|length == 2
+- name: check multiple line config filter is working
+ register: result
+ vyos.vyos.vyos_config:
+ allow_password_change: none
+ lines:
+ - set system login user esa full-name 'ESA admin'
+ - set system login user esa authentication encrypted-password '!abc!'
+ - set system login user vyos full-name 'VyOS admin'
+ - set system login user vyos authentication encrypted-password 'abc'
+ - set system login user john full-name 'John'
+ - set system login user john authentication plaintext-password 'xyz'
+
+- assert:
+ that:
+ - result.filtered|length == 3
+
+- name: check multiple line config filter is working
+ register: result
+ vyos.vyos.vyos_config:
+ allow_password_change: all
+ lines:
+ - set system login user esa full-name 'ESA admin'
+ - set system login user esa authentication encrypted-password '!abc!'
+ - set system login user vyos full-name 'VyOS admin'
+ - set system login user vyos authentication encrypted-password 'abc'
+ - set system login user john full-name 'John'
+ - set system login user john authentication plaintext-password 'xyz'
+
+- assert:
+ that:
+ - result.filtered|length == 0
+
- debug: msg="END cli/config_check.yaml on connection={{ ansible_connection }}"