From 636453c51134cc3a049598c1d41d0e3cf99b9c65 Mon Sep 17 00:00:00 2001 From: rohitthakur2590 Date: Fri, 3 Nov 2023 17:54:48 +0530 Subject: [PATCH] Fix ansible-lint reported errors and update docs Signed-off-by: rohitthakur2590 --- changelogs/fragments/lint_fixtures.yaml | 3 +++ docs/cisco.asa.asa_config_module.rst | 9 ++++----- plugins/modules/asa_config.py | 11 +++++------ 3 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 changelogs/fragments/lint_fixtures.yaml diff --git a/changelogs/fragments/lint_fixtures.yaml b/changelogs/fragments/lint_fixtures.yaml new file mode 100644 index 00000000..ed913ff8 --- /dev/null +++ b/changelogs/fragments/lint_fixtures.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - Fix ansible lint errors and update docs. diff --git a/docs/cisco.asa.asa_config_module.rst b/docs/cisco.asa.asa_config_module.rst index c3a2ed10..61a2551a 100644 --- a/docs/cisco.asa.asa_config_module.rst +++ b/docs/cisco.asa.asa_config_module.rst @@ -80,7 +80,7 @@ Parameters -
This is a dict object containing configurable options related to backup file path. The value of this option is read only when backup is set to yes, if backup is set to no this option will be silently ignored.
+
This is a dict object containing configurable options related to backup file path. The value of this option is read only when backup is set to true, if backup is set to no this option will be silently ignored.
@@ -360,7 +360,6 @@ Examples - message-length maximum 512 match: line parents: [policy-map type inspect dns PM-DNS, parameters] - authorize: yes auth_pass: cisco username: admin password: cisco @@ -370,7 +369,7 @@ Examples lines: - ikev1 pre-shared-key MyS3cretVPNK3y parents: tunnel-group 1.1.1.1 ipsec-attributes - passwords: yes + passwords: true - name: attach ASA acl on interface vlan13/nameif cloud13 cisco.asa.asa_config: @@ -414,7 +413,7 @@ Examples cisco.asa.asa_config: lines: - access-group cloud-acl_access_in in interface cloud13 - backup: yes + backup: true backup_options: filename: backup.cfg dir_path: /home/user @@ -446,7 +445,7 @@ Common return values are documented `here string - when backup is yes + when backup is true
The full path to the backup file

diff --git a/plugins/modules/asa_config.py b/plugins/modules/asa_config.py index 793844f8..0430a0fd 100644 --- a/plugins/modules/asa_config.py +++ b/plugins/modules/asa_config.py @@ -95,7 +95,7 @@ value is not given, the backup file is written to the C(backup) folder in the playbook root directory. If the directory does not exist, it is created. type: bool - default: no + default: false config: description: - The C(config) argument allows the playbook designer to supply the base configuration @@ -125,7 +125,7 @@ backup_options: description: - This is a dict object containing configurable options related to backup file - path. The value of this option is read only when C(backup) is set to I(yes), + path. The value of this option is read only when C(backup) is set to I(true), if C(backup) is set to I(no) this option will be silently ignored. suboptions: filename: @@ -182,7 +182,6 @@ - message-length maximum 512 match: line parents: [policy-map type inspect dns PM-DNS, parameters] - authorize: yes auth_pass: cisco username: admin password: cisco @@ -192,7 +191,7 @@ lines: - ikev1 pre-shared-key MyS3cretVPNK3y parents: tunnel-group 1.1.1.1 ipsec-attributes - passwords: yes + passwords: true - name: attach ASA acl on interface vlan13/nameif cloud13 cisco.asa.asa_config: @@ -236,7 +235,7 @@ cisco.asa.asa_config: lines: - access-group cloud-acl_access_in in interface cloud13 - backup: yes + backup: true backup_options: filename: backup.cfg dir_path: /home/user @@ -254,7 +253,7 @@ sample: ['...', '...'] backup_path: description: The full path to the backup file - returned: when backup is yes + returned: when backup is true type: str sample: /playbooks/ansible/backup/asa_config.2016-07-16@22:28:34 """