Skip to content

Commit

Permalink
Fix ansible-lint reported errors and update docs (#218)
Browse files Browse the repository at this point in the history
* Fix ansible-lint reported errors and update docs

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* fix wf

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

---------

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
  • Loading branch information
rohitthakur2590 authored Nov 27, 2023
1 parent e989748 commit ff52e6c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 25 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/lint.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ on: # yamllint disable-line rule:truthy
schedule:
- cron: '0 0 * * *'


jobs:
ansible-lint:
uses: ansible-network/github_actions/.github/workflows/ansible-lint.yml@main
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
if: github.event_name == 'pull_request'
Expand All @@ -28,8 +29,9 @@ jobs:
git+https://github.com/ansible-collections/ansible.utils.git
git+https://github.com/ansible-collections/ansible.netcommon.git
all_green:
if: ${{ always() && (github.event_name != 'schedule') }}
if: ${{ always() }}
needs:
- ansible-lint
- changelog
- sanity
- unit-galaxy
Expand All @@ -39,6 +41,7 @@ jobs:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.ansible-lint.result }}',
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}',
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/lint_fixtures.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- Fix ansible lint errors and update docs.
9 changes: 4 additions & 5 deletions docs/cisco.asa.asa_config_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Parameters
<td>
</td>
<td>
<div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
<div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>true</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -446,7 +445,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<span style="color: purple">string</span>
</div>
</td>
<td>when backup is yes</td>
<td>when backup is true</td>
<td>
<div>The full path to the backup file</div>
<br/>
Expand Down
11 changes: 5 additions & 6 deletions plugins/modules/asa_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
"""
Expand Down

0 comments on commit ff52e6c

Please sign in to comment.