Skip to content

Commit

Permalink
silence linters
Browse files Browse the repository at this point in the history
  • Loading branch information
suhancz committed May 16, 2024
1 parent b3e5b2a commit 5dada98
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 17 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#checkov:skip=CKV_DOCKER_2: no need for health check
#checkov:skip=CKV_DOCKER_3: no need for special user
#checkov:skip=CKV_DOCKER_7: I prefer the latest, like it, or not ;)
# checkov:skip=CKV_DOCKER_2: no need for health check
# checkov:skip=CKV_DOCKER_3: no need for special user
# checkov:skip=CKV_DOCKER_7: I prefer the latest, like it, or not ;)
# hadolint ignore=DL3007
FROM quay.io/almalinuxorg/8-init:latest
ENV container docker

RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in ; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done);
WORKDIR /

RUN "(cd /lib/systemd/system/sysinit.target.wants/; for i in ; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done);"

RUN rm -rf /lib/systemd/system/multi-user.target.wants/ \
&& rm -rf /etc/systemd/system/.wants/ \
Expand All @@ -14,6 +17,7 @@ RUN rm -rf /lib/systemd/system/multi-user.target.wants/ \
&& rm -rf /lib/systemd/system/basic.target.wants/ \
&& rm -f /lib/systemd/system/anaconda.target.wants/*

# hadolint ignore=DL3041
RUN dnf -y install dnf-plugin-config-manager epel-release \
&& dnf config-manager --set-enabled powertools \
&& rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 \
Expand All @@ -22,6 +26,7 @@ RUN dnf -y install dnf-plugin-config-manager epel-release \
&& rpm --import https://mirror.apheleia-it.ch/repos/Kolab:/16/key.asc \
&& rpm -Uvh https://mirror.apheleia-it.ch/repos/Kolab:/16/kolab-16-for-el8.rpm \
&& dnf update --allowerasing -y \
&& dnf -y install kolab
&& dnf -y install kolab \
&& dnf clean all
VOLUME [ “/sys/fs/cgroup” ]
CMD ["/usr/sbin/init"]
2 changes: 1 addition & 1 deletion tasks/backups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
- pdns
- wg_vpn
- name: Restore backups
#checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition and the tags
# checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition and the tags
tags: restore
when: mariadb_backup_path is defined or ldap_backup_path is defined or opendkim_backup_path is defined or opendmarc_backup_path is defined or vsftpd_backup_path is defined or ssl_backup_path is defined or kolab_backup_path is defined or imap_backup_path is defined or postfix_backup_path is defined or pdns_backup_path is defined or wg_vpn_backup_path is defined
block:
Expand Down
2 changes: 1 addition & 1 deletion tasks/convert_user_to_ldif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
changed_when: passwd_mig_content.rc == 0
failed_when: (passwd_mig_content.rc != 0) and (passwd_mig_content.stderr | length > 0)
- name: "Migrate already existing user {{ user_data_item.name }}"
#checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
# checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
when: passwd_mig_content.changed
block:
- name: Set passwd line
Expand Down
2 changes: 1 addition & 1 deletion tasks/httpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- http
- https
- name: Set up SELinux rules
#checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
# checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
when: getenforce.stdout != 'Disabled'
block:
- name: Set SELinux booleans
Expand Down
2 changes: 1 addition & 1 deletion tasks/imapsync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Sync old IMAP account to the current mailbox
#checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition and the tags
# checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition and the tags
no_log: yes
when: current_user.old_imap_mail is defined
tags: imapsync
Expand Down
2 changes: 1 addition & 1 deletion tasks/kolab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
state: restarted

- name: Enable domains
#checkov:skip=CKV2_ANSIBLE_3: Block is used for the tag only
# checkov:skip=CKV2_ANSIBLE_3: Block is used for the tag only
tags: ldap
block:
# The editing domains in the Kolab API is not documented at the tome of this writing, so I go plain LDAP here
Expand Down
2 changes: 1 addition & 1 deletion tasks/os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

- name: Enable IPv6
when: ansible_default_ipv6.address is not defined
#checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition
# checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition
block:
- name: Enable IPv6 via sysctl
ansible.posix.sysctl:
Expand Down
4 changes: 2 additions & 2 deletions tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
backup: yes
create: yes
- name: Set up Remi repository
#checkov:skip=CKV2_ANSIBLE_4: The Remi repo doesn't provide GPG keys
# checkov:skip=CKV2_ANSIBLE_4: The Remi repo doesn't provide GPG keys
ansible.builtin.dnf:
name: "https://rpms.remirepo.net/enterprise/remi-release-{{ ansible_distribution_major_version }}.rpm"
disable_gpg_check: yes
Expand Down Expand Up @@ -483,7 +483,7 @@
# remote_src: yes
# backup: yes
- name: Download as-is executables
#checkov:skip=CKV2_ANSIBLE_2: HTTPS comes from a loop variable
# checkov:skip=CKV2_ANSIBLE_2: HTTPS comes from a loop variable
tags: imapsync
ansible.builtin.get_url:
url: "{{ item.url }}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/postfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
backup: yes
notify: Restart postfix
- name: Set up HELO access whitelist
#checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
# checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
when: helo_access is defined
block:
- name: Create HELO access whitelist
Expand Down
2 changes: 1 addition & 1 deletion tasks/poweradmin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Get latest PowerAdmin version
#checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
# checkov:skip=CKV2_ANSIBLE_3: Block is used for the when condition only
tags:
- dyndns
- poweradmin
Expand Down
2 changes: 1 addition & 1 deletion tasks/read_wireguard_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
path: "{{ wg_config_file }}"
register: wg_config_file_info
- name: Read existing WireGuard config into variable
#checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition
# checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition
when: wg_config_file_info.stat.exists
block:
- name: Read WireGuard config file
Expand Down
2 changes: 1 addition & 1 deletion tasks/webdav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
state: mounted
fstype: fuse.bindfs
- name: Set up SELinux rules for WebDAV
#checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition and the tags
# checkov:skip=CKV2_ANSIBLE_3: Block is only used for the when condition and the tags
tags: wireguard
when: getenforce.stdout != 'Disabled'
block:
Expand Down

0 comments on commit 5dada98

Please sign in to comment.