From 145895dcf02c5bff71a2c3e00843c2787429623d Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Thu, 10 Aug 2017 13:09:53 -0400 Subject: [PATCH] updates examples and documentation (#24211) includes better examples of valid and invalid usage of the lines argument fixes #22828 --- .../modules/network/sros/sros_config.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/sros/sros_config.py b/lib/ansible/modules/network/sros/sros_config.py index 61b9158439..055fc80c1c 100644 --- a/lib/ansible/modules/network/sros/sros_config.py +++ b/lib/ansible/modules/network/sros/sros_config.py @@ -33,7 +33,8 @@ options: section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the - device config parser. + device config parser. The I(lines) argument only supports current + context lines. See EXAMPLES required: false default: null aliases: ['commands'] @@ -189,6 +190,23 @@ vars: src: "{{ inventory_hostname }}.cfg" provider: "{{ cli }}" save: yes + +- name: invalid use of lines + sros_config: + lines: + - service + - vpls 1000 customer foo 1 create + - description "invalid lines example" + provider: "{{ cli }}" + +- name: valid use of lines + sros_config: + lines: + - description "invalid lines example" + parents: + - service + - vpls 1000 customer foo 1 create + provider: "{{ cli }}" """ RETURN = """