Skip to content

Commit 884f012

Browse files
authored
Fixed linting issues (#556)
* Fixed linting issues Signed-off-by: schamola <[email protected]> * linting issue Signed-off-by: schamola <[email protected]> --------- Signed-off-by: schamola <[email protected]>
1 parent 9bce4ad commit 884f012

10 files changed

+69
-72
lines changed

playbooks/demo_chsec.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
- name: CHSEC on AIX
33
hosts: "{{host_name}}"
4-
gather_facts: False
4+
gather_facts: false
55
vars:
66
host_name: all
7-
tasks:
7+
tasks:
88
- name: Add registry as files for a user
99
ibm.power_aix.chsec:
1010
file: /etc/security/user
@@ -31,9 +31,9 @@
3131
path: /etc/security/user
3232
stanza: "{{ item }}"
3333
attrs:
34-
account_locked: True
35-
login: False
36-
rlogin: False
34+
account_locked: true
35+
login: false
36+
rlogin: false
3737
state: present
3838
loop:
3939
- "adm"
@@ -55,7 +55,7 @@
5555
file: /etc/security/user
5656
stanza: joe
5757
attrs:
58-
su: False
58+
su: false
5959
state: present
6060
- name: Set password rules for a user
6161
ibm.power_aix.chsec:
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
3-
#Demo playbook
4-
#Create a local nginx with the patches
5-
#Download patches with playbook:
6-
#demo_shell_flrtvc_wget_ifix.yml
2+
3+
# Demo playbook
4+
# Create a local nginx with the patches
5+
# Download patches with playbook:
6+
# demo_shell_flrtvc_wget_ifix.yml
77
- name: "Demo install ifix from flrtvc from local patch server"
88
hosts: all
9-
gather_facts: no
9+
gather_facts: false
1010
vars:
1111
localpatchserver: "192.168.1.1"
1212
localpatchpath: "ifix"
@@ -15,20 +15,20 @@
1515
flrtvczip: "{{protocol}}://{{localpatchserver}}/{{localpatchpath}}/FLRTVC-latest.zip"
1616
apar_csv_url: "{{protocol}}://{{localpatchserver}}/{{localpatchpath}}/apar.csv"
1717
debug: false
18-
collections:
19-
- ibm.power_aix
2018
tasks:
21-
- name: Download apar.csv to {{ apar_csv }} from {{ apar_csv_url }}
22-
ansible.builtin.shell:
23-
cmd: "wget -q --no-check-certificate {{ apar_csv_url }} -O {{ apar_csv }}"
19+
- name: Download apar.csv to /tmp/apar.csv from {{ apar_csv_url }}
20+
ansible.builtin.get_url:
21+
url: "{{ apar_csv_url }}"
22+
dest: "{{ apar_csv }}"
23+
validate_certs: false
2424

25-
- name: install all security interim fixes
25+
- name: Install all security interim fixes
2626
ibm.power_aix.flrtvc:
2727
apar: "sec"
2828
verbose: true
2929
protocol: "{{ protocol }}"
30-
force: no
31-
clean: no
30+
force: false
31+
clean: false
3232
flrtvczip: "{{ flrtvczip }}"
3333
localpatchserver: "{{ localpatchserver }}"
3434
localpatchpath: "{{ localpatchpath }}"
@@ -39,7 +39,7 @@
3939
https_proxy: ""
4040
PATH: "/usr/bin:/usr/sbin:/usr/local/bin:/opt/freeware/bin"
4141

42-
- name: debug reg_install
42+
- name: Debug reg_install
4343
ansible.builtin.debug:
4444
var: reg_install
4545
when: debug

playbooks/demo_hdcrypt_pks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
device: "{{ lv_val }}"
2929
location: "{{ loc }}"
3030
passphrase: "{{ pass_val }}"
31-
no_log: True
31+
no_log: true
3232

3333
- name: "Import PKS key"
3434
ibm.power_aix.hdcrypt_pks:
3535
action: import
3636
device: "{{ lv_val }}"
3737
location: "{{ loc }}"
3838
passphrase: "{{ pass_val }}"
39-
no_log: True
39+
no_log: true
4040

4141
- name: "Clean invalid PKS key"
4242
ibm.power_aix.hdcrypt_pks:
4343
action: clean
44-
pks_label: "{{ key_label }}"
44+
pks_label: "{{ key_label }}"

playbooks/demo_install_all_updates.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
device: "{{ device_val }}"
1717
update_rpm: true
1818

19-
- name: install the latest level of install utilities on device /dev/cd0 (bos.rte.install update)
19+
- name: Install the latest level of install utilities on device /dev/cd0 (bos.rte.install update)
2020
ibm.power_aix.install_all_updates:
2121
device: "{{ device_val }}"
22-
utilities_only: true
22+
utilities_only: true

playbooks/demo_lku.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,34 @@
44
gather_facts: false
55
vars:
66
host_name: all
7-
PVC_name: powervchostname
8-
PVC_password: passw0rd123
9-
PVC_user: powervcuser
7+
pvc_name: powervchostname
8+
pvc_password: passw0rd123
9+
pvc_user: powervcuser
1010
directory: /tmp
1111
filesets_fixes: bos.mp64 bos.rte.libc IZ12345.140806.epkg.Z
1212

1313
tasks:
1414
- name: To install the updates to two filesets and to install an interim fix
1515
ibm.power_aix.lku:
16-
PVC_name: "{{ PVC_name }}"
17-
PVC_password: "{{ PVC_password }}"
18-
PVC_user: "{{ PVC_user }}"
16+
PVC_name: "{{ pvc_name }}"
17+
PVC_password: "{{ pvc_password }}"
18+
PVC_user: "{{ pvc_user }}"
1919
directory: "{{ directory }}"
2020
filesets_fixes: "{{ filesets_fixes }}"
2121

2222
- name: To install all the updates and interim fixes that are available in the /tmp directory
2323
ibm.power_aix.lku:
24-
PVC_name: "{{ PVC_name }}"
25-
PVC_password: "{{ PVC_password }}"
26-
PVC_user: "{{ PVC_user }}"
24+
PVC_name: "{{ pvc_name }}"
25+
PVC_password: "{{ pvc_password }}"
26+
PVC_user: "{{ pvc_user }}"
2727
directory: "{{ directory }}"
2828
filesets_fixes: all
2929

3030
- name: To install all the updates, but not interim fixes, that are located in the /tmp directory
3131
ibm.power_aix.lku:
32-
PVC_name: "{{ PVC_name }}"
33-
PVC_password: "{{ PVC_password }}"
34-
PVC_user: "{{ PVC_user }}"
32+
PVC_name: "{{ pvc_name }}"
33+
PVC_password: "{{ pvc_password }}"
34+
PVC_user: "{{ pvc_user }}"
3535
directory: "{{ directory }}"
36-
filesets_fixes: update_all
36+
filesets_fixes: update_all
37+

playbooks/demo_mpio.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
- name: Gather mpio information when device and parent is provided
2323
ibm.power_aix.mpio:
2424
device: hdisk1
25-
parent: vscsi0
25+
parent: vscsi0

playbooks/demo_password_rules_policies.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@
1111
stanza: "{{ stanza_val }}"
1212
registry: files
1313
state: present
14-
ignore_errors: true
14+
1515
- name: Change login times for user
1616
ibm.power_aix.password_rules_policies:
1717
stanza: "{{ stanza_val }}"
1818
logintimes: :0800-1700
1919
state: present
20-
ignore_errors: true
20+
2121
- name: Remove registry attribute from stanza
2222
ibm.power_aix.password_rules_policies:
2323
stanza: "{{ stanza_val }}"
2424
registry: files
2525
state: absent
26-
ignore_errors: true
26+
2727
- name: Lock System User Accounts
2828
ibm.power_aix.password_rules_policies:
2929
stanza: "{{ stanza_val }}"
3030
account_locked: "true"
3131
login: "false"
3232
rlogin: "false"
3333
state: present
34-
ignore_errors: true
34+
3535
- name: Allow other users to switch to this user using su command
3636
ibm.power_aix.password_rules_policies:
3737
stanza: "{{ stanza_val }}"
3838
su: true
3939
state: present
40-
ignore_errors: true
40+
4141
- name: Set password rules for a user
4242
ibm.power_aix.password_rules_policies:
4343
stanza: "{{ stanza_val }}"
@@ -46,20 +46,19 @@
4646
maxrepeats: 4
4747
minlen: 8
4848
state: present
49-
ignore_errors: true
49+
5050
- name: Make the user admin
5151
ibm.power_aix.password_rules_policies:
5252
stanza: "{{ stanza_val }}"
5353
admin: true
54-
ignore_errors: true
54+
5555
- name: Remove admin rights from the user
5656
ibm.power_aix.password_rules_policies:
5757
stanza: "{{ stanza_val }}"
5858
admin: false
59-
ignore_errors: true
59+
6060
- name: Set core compress and core path to On
6161
ibm.power_aix.password_rules_policies:
6262
stanza: "{{ stanza_val }}"
63-
core_compress: on
64-
core_path: on
65-
ignore_errors: true
63+
core_compress: "on"
64+
core_path: "on"

playbooks/demo_shell_flrtvc_wget_ifix.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Or create your own nginx server with a similar setup
88
- name: "AIX sync all ifixes on webserver"
99
hosts: aap-server
10-
gather_facts: no
10+
gather_facts: false
1111
vars:
1212
ifix_path: "/var/lib/awx/ifix/"
1313
ifix_url: "https://aix.software.ibm.com/aix/ifixes/security/"
@@ -21,56 +21,59 @@
2121
sync_apar: true
2222
sync_flrtvc: true
2323
tasks:
24-
- name: "Create ifix_path {{ ifix_path }} if not exists"
24+
- name: "Create ifix_path /var/lib/awx/ifix/ if not exists"
2525
ansible.builtin.file:
2626
path: "{{ ifix_path }}"
2727
state: directory
2828
mode: '0755'
2929

30-
- name: "Synchronizing ifix to {{ ifix_path }} from {{ ifix_url }} "
31-
ansible.builtin.shell:
30+
- name: "Synchronizing ifix to /var/lib/awx/ifix/ from {{ ifix_url }} "
31+
ansible.builtin.command:
3232
cmd: "{{ proxy }} wget -q -nc -r -np -nd --no-check-certificate -l 1 -A .tar,.asc,.sig {{ ifix_url }} "
3333
chdir: "{{ ifix_path }}"
34+
changed_when: true
3435
register: ifixd
3536
when: sync_ifix
3637

37-
- name: print ifixd
38+
- name: Print ifixd
3839
ansible.builtin.debug:
3940
var: ifixd
40-
when:
41+
when:
4142
- sync_ifix
4243
- debug
4344

44-
- name: "Synchronizing {{ ifix_path }}/{{ apar_csv_filename }} from {{ apr_csv_url }}"
45-
ansible.builtin.shell:
45+
- name: "Synchronizing /var/lib/awx/ifix/apar.csv from {{ apr_csv_url }}"
46+
ansible.builtin.command:
4647
cmd: "{{ proxy }} wget -k {{ apar_csv_url }} -O {{ apar_csv_filename }}"
4748
chdir: "{{ ifix_path }}"
49+
changed_when: true
4850
register: apard
4951
when: sync_apar
5052

51-
- name: print apard
53+
- name: Print apard
5254
ansible.builtin.debug:
5355
var: apard
54-
when:
56+
when:
5557
- sync_apar
5658
- debug
5759

58-
- name: "Synchronizing {{ ifix_path }}/{{ flrtvc_filename }} from {{ flrtvc_url }}"
59-
ansible.builtin.shell:
60+
- name: "Synchronizing /var/lib/awx/ifix/FLRTVC-latest.zip from {{ flrtvc_url }}"
61+
ansible.builtin.command:
6062
cmd: "{{ proxy }} wget -k {{ flrtvc_url }} -O {{ flrtvc_filename }}"
6163
chdir: "{{ ifix_path }}"
64+
changed_when: true
6265
register: flrtvcd
6366
when: sync_flrtvc
6467

65-
- name: print flrtvcd
68+
- name: Print flrtvcd
6669
ansible.builtin.debug:
6770
var: flrtvcd
68-
when:
71+
when:
6972
- sync_flrtvc
7073
- debug
7174

7275
- name: "Recursive fix permissions on ifix_path {{ ifix_path }}"
7376
ansible.builtin.file:
7477
path: "{{ ifix_path }}"
7578
mode: "u=rwX,g=rwX,o=rX"
76-
recurse: yes
79+
recurse: true

tests/sanity/ignore-2.14.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/sanity/ignore-2.15.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)