Skip to content

Commit

Permalink
fix ansible-lint octal mode issues
Browse files Browse the repository at this point in the history
  • Loading branch information
richm committed Jun 4, 2024
1 parent d66678e commit 109a25c
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion tasks/shell_pcs/cluster-setup-corosync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
dest: /etc/corosync/corosync.conf
owner: root
group: root
mode: 0644
mode: "0644"
register: __ha_cluster_distribute_corosync_conf
when: __ha_cluster_data_corosync_conf is defined

Expand Down
4 changes: 2 additions & 2 deletions tasks/shell_pcs/cluster-setup-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
dest: /etc/corosync/authkey
owner: root
group: root
mode: 0400
mode: "0400"
register: __ha_cluster_distribute_corosync_authkey

- name: Get pacemaker authkey
Expand All @@ -31,7 +31,7 @@
dest: /etc/pacemaker/authkey
owner: hacluster
group: haclient
mode: 0400
mode: "0400"
register: __ha_cluster_distribute_pacemaker_authkey

- name: Remove qdevice certificates [CLI]
Expand Down
6 changes: 3 additions & 3 deletions tasks/shell_pcs/configure-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@
dest: /var/lib/pcsd/pcsd.key
owner: root
group: root
mode: 0600
mode: "0600"
- name: Distribute pcsd TLS certificate
copy:
src: "{{ ha_cluster_pcsd_public_key_src }}"
dest: /var/lib/pcsd/pcsd.crt
owner: root
group: root
mode: 0600
mode: "0600"

- name: Distribute pcs_settings.conf
template:
src: templates/pcs_settings.conf
dest: /var/lib/pcsd/pcs_settings.conf
owner: root
group: root
mode: 0644
mode: "0644"
trim_blocks: false

- name: Start pcsd with updated config files and configure it to start on boot
Expand Down
4 changes: 2 additions & 2 deletions tasks/shell_pcs/create-and-push-cib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
dest: "{{ item }}"
owner: root
group: root
mode: 0600
mode: "0600"
loop:
- "{{ __ha_cluster_tempfile_cib_xml.path }}"
- "{{ __ha_cluster_tempfile_original_cib_xml.path }}"
Expand Down Expand Up @@ -276,7 +276,7 @@
dest: "{{ __ha_cluster_tempfile_cib_diff.path }}"
owner: root
group: root
mode: 0600
mode: "0600"
check_mode: false
changed_when: not ansible_check_mode
when: __ha_cluster_cib_diff.rc == 1
Expand Down
12 changes: 6 additions & 6 deletions tasks/shell_pcs/sbd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
lineinfile:
path: "/etc/modprobe.d/{{ item }}.conf"
create: true
mode: 0644
mode: "0644"
# wokeignore:rule=blacklist
regexp: "^(options|blacklist) {{ item }}"
# wokeignore:rule=blacklist
Expand All @@ -35,7 +35,7 @@
lineinfile:
path: "/etc/modules-load.d/{{ item }}.conf"
create: true
mode: 0644
mode: "0644"
regexp: "^{{ item }}"
line: "{{ item }}"
state: present
Expand Down Expand Up @@ -95,7 +95,7 @@
dest: /etc/sysconfig/sbd
owner: root
group: root
mode: 0644
mode: "0644"
vars:
options: "{{ ha_cluster_sbd_options | d([]) }}"
node_name: "{{ __ha_cluster_node_name }}"
Expand All @@ -119,15 +119,15 @@
state: directory
owner: root
group: root
mode: 0755
mode: "0755"

- name: Override start timeout for SBD
template:
src: templates/override-timeout.conf
dest: /etc/systemd/system/sbd.service.d/override-timeout.conf
owner: root
group: root
mode: 0644
mode: "0644"
vars:
# Make sure the timeout is at least the default 90 seconds.
# The intent is to make the timeout longer if needed, not shorter.
Expand Down Expand Up @@ -169,7 +169,7 @@
state: file
owner: hacluster
group: haclient
mode: 0600
mode: "0600"
when:
- not pacemaker_running

Expand Down
6 changes: 3 additions & 3 deletions tests/tasks/fixture_psks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
copy:
content: "{{ lookup('pipe', 'openssl rand -base64 256') | b64decode }}"
dest: "{{ __test_corosync_key_path }}"
mode: 0400
mode: "0400"

- name: Generate pacemaker key
copy:
content: "{{ lookup('pipe', 'openssl rand -base64 256') | b64decode }}"
dest: "{{ __test_pacemaker_key_path }}"
mode: 0400
mode: "0400"

- name: Generate fence_xvm key
copy:
content: "{{ lookup('pipe', 'openssl rand -base64 512') | b64decode }}"
dest: "{{ __test_fence_xvm_key_path }}"
mode: 0400
mode: "0400"
2 changes: 1 addition & 1 deletion tests/tasks/qnetd_backup_restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
file:
path: /etc/corosync/qnetd_backup
state: directory
mode: 0700
mode: "0700"

# Ansible copy doesn't support 'mode: preserve' with 'remote_src: true'
- name: Back up qnetd settings
Expand Down
12 changes: 6 additions & 6 deletions tests/tests_cluster_basic_existing_psks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: "0755"
loop:
- /etc/corosync
- /etc/pacemaker
Expand All @@ -52,23 +52,23 @@
dest: /etc/corosync/authkey
owner: root
group: root
mode: 0400
mode: "0400"

- name: Ensure pacemaker key is present
copy:
src: "{{ __test_pacemaker_key_path }}"
dest: /etc/pacemaker/authkey
owner: root
group: root
mode: 0400
mode: "0400"

- name: Ensure fence-virt key is present
copy:
src: "{{ __test_fence_xvm_key_path }}"
dest: /etc/cluster/fence_xvm.key
owner: root
group: root
mode: 0400
mode: "0400"
when: __test_fence_virt_supported

- name: Distribute pcsd TLS private key
Expand All @@ -77,15 +77,15 @@
dest: /var/lib/pcsd/pcsd.key
owner: root
group: root
mode: 0600
mode: "0600"

- name: Distribute pcsd TLS certificate
copy:
src: "{{ __test_pcsd_public_key_path }}"
dest: /var/lib/pcsd/pcsd.crt
owner: root
group: root
mode: 0600
mode: "0600"

- name: Get corosync key hash
stat:
Expand Down
8 changes: 4 additions & 4 deletions tests/tests_cluster_basic_new_psks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: "0755"
loop:
- /etc/pacemaker
- /var/lib/pcsd
Expand All @@ -54,7 +54,7 @@
dest: /etc/pacemaker/authkey
owner: root
group: root
mode: 0400
mode: "0400"

- name: Ensure fence-virt key is not present
file:
Expand All @@ -68,15 +68,15 @@
dest: /var/lib/pcsd/pcsd.key
owner: root
group: root
mode: 0600
mode: "0600"

- name: Distribute pcsd TLS certificate
copy:
src: "{{ __test_pcsd_public_key_path }}"
dest: /var/lib/pcsd/pcsd.crt
owner: root
group: root
mode: 0600
mode: "0600"

- name: Get corosync key hash
stat:
Expand Down

0 comments on commit 109a25c

Please sign in to comment.