Skip to content

Commit

Permalink
chore(deps): update oxsecurity/megalinter action to v8 (#50)
Browse files Browse the repository at this point in the history
Co-authored-by: my-renovate[bot] <105243867+my-renovate[bot]@users.noreply.github.com>
  • Loading branch information
my-renovate[bot] authored Sep 20, 2024
1 parent 3451d7e commit 6c01852
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 44 deletions.
6 changes: 2 additions & 4 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
skip_list:
# Role name virtio-win does not match ``^[a-z][a-z0-9_]+$`` pattern
- "role-name"
- role-name
# Lines should be no longer than 160 chars
- "yaml"

verbosity: 1
- yaml
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
chmod a+x README.sh
- name: 💡 MegaLinter
uses: oxsecurity/megalinter@5199c6377b4cb7faff749a1971636f3343db9fe6 # v7.12.0
uses: oxsecurity/megalinter@c217fe8f7bc9207062a084e989bd97efd56e7b9a # v8.0.0
env:
GITHUB_COMMENT_REPORTER: false
# Disabled due to error: [GitHub Status Reporter] Error posting Status for REPOSITORY with ...: 403
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Python 3.
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.x"
python-version: 3.x

- name: Install test dependencies
run: pip3 install ansible molecule-plugins[docker] docker
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
inputs:
dryRun:
type: boolean
description: "Dry-Run"
description: Dry-Run
logLevel:
type: choice
description: "Log-Level"
description: Log-Level
default: debug
options:
- info
Expand All @@ -20,11 +20,11 @@ on:
- main
- "!renovate/*"
schedule:
- cron: "0 0-3 * * 0"
- cron: 0 0-3 * * 0

env:
# https://docs.renovatebot.com/troubleshooting/#log-debug-levels
LOG_LEVEL: "${{ inputs.logLevel || 'debug' }}"
LOG_LEVEL: ${{ inputs.logLevel || 'debug' }}
# https://docs.renovatebot.com/self-hosted-configuration/#repositories
RENOVATE_REPOSITORIES: ${{ github.repository }}
# https://docs.renovatebot.com/self-hosted-configuration/#username
Expand All @@ -33,9 +33,9 @@ env:
RENOVATE_PLATFORM_COMMIT: "true"
# https://docs.renovatebot.com/self-hosted-configuration/#dryrun
# Run renovate in dry-run mode if executed in branches other than main - prevents versions in PRs/branches from being updated
RENOVATE_DRY_RUN: "${{ inputs.dryRun || ( github.head_ref || github.ref_name ) != 'main' || false }}"
RENOVATE_DRY_RUN: ${{ inputs.dryRun || ( github.head_ref || github.ref_name ) != 'main' || false }}
# Renovate Automerge
RENOVATE_AUTOMERGE_TYPE: "branch"
RENOVATE_AUTOMERGE_TYPE: branch
RENOVATE_AUTOMERGE: "true"

permissions: read-all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: stale
on:
workflow_dispatch:
schedule:
- cron: "9 9 * * *"
- cron: 9 9 * * *

permissions:
issues: write
Expand Down
6 changes: 6 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Configuration file for MegaLinter
# See all available variables at https://megalinter.io/latest/configuration/ and in linters documentation

ANSIBLE_ANSIBLE_LINT_PRE_COMMANDS:
- command: |
mkdir -pv "${HOME}/.ansible/roles" && \
cd "${HOME}/.ansible/roles" && \
ln -sv ../../../workspace "${GITHUB_REPOSITORY#*/}"
BASH_SHFMT_ARGUMENTS: --case-indent --indent 2 --space-redirects

DISABLE_LINTERS:
Expand Down
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- name: systemd daemon-reload
- name: Systemd daemon-reload
ansible.builtin.systemd:
daemon_reload: yes
daemon_reload: true
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ galaxy_info:
# - CC-BY
license: MIT

min_ansible_version: 1.2
min_ansible_version: "1.2"

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
image: geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
54 changes: 27 additions & 27 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# tasks file for proxy_settings

- name: Configure proxy settings for OS (/etc/environment)
blockinfile:
ansible.builtin.blockinfile:
dest: /etc/environment
create: yes
create: true
mode: u=rw,g=r,o=r
block: |
{% if proxy_settings_http_proxy is defined %}
Expand All @@ -26,7 +26,7 @@
tags: proxy

- name: Configure proxy settings for OS (/etc/profile.d/proxy.sh)
template:
ansible.builtin.template:
src: proxy.sh.j2
dest: /etc/profile.d/proxy.sh
mode: u=rw,g=r,o=r
Expand All @@ -41,7 +41,7 @@
- name: Configure proxy settings for systemd services
ansible.builtin.lineinfile:
path: /etc/systemd/system.conf
regexp: "^DefaultEnvironment="
regexp: ^DefaultEnvironment=
line: >-
DefaultEnvironment={% if proxy_settings_ftp_proxy is defined %}"FTP_PROXY={{ proxy_settings_ftp_proxy }}"{% endif %}
{% if proxy_settings_http_proxy is defined %}"HTTP_PROXY={{ proxy_settings_http_proxy }}"{% endif %}
Expand All @@ -52,17 +52,17 @@
{% if proxy_settings_https_proxy is defined %}"https_proxy={{ proxy_settings_https_proxy }}"{% endif %}
{% if proxy_settings_no_proxy is defined %}"no_proxy={{ proxy_settings_no_proxy }}"{% endif %}
when: systemd_system_conf.stat.exists
notify: systemd daemon-reload
notify: Systemd daemon-reload
tags: proxy

- name: Check if wgetrc exists
stat:
ansible.builtin.stat:
path: /etc/wgetrc
register: wgetrc
tags: proxy

- name: Add proxy settings to wgetrc (if exists)
blockinfile:
ansible.builtin.blockinfile:
dest: /etc/wgetrc
mode: u=rw,g=r,o=r
block: |
Expand All @@ -83,69 +83,69 @@
tags: proxy

- name: Configure proxy settings for dnf
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/dnf/dnf.conf
regexp: "^proxy="
line: "proxy={{ proxy_settings_yum_proxy }}"
regexp: ^proxy=
line: proxy={{ proxy_settings_yum_proxy }}
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'dnf' and proxy_settings_yum_proxy is defined

- name: Configure proxy_username for dnf
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/dnf/dnf.conf
regexp: "^proxy_username="
line: "proxy_username={{ proxy_settings_yum_proxy_username }}"
regexp: ^proxy_username=
line: proxy_username={{ proxy_settings_yum_proxy_username }}
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'dnf' and proxy_settings_yum_proxy_username is defined

- name: Configure proxy_password for dnf
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/dnf/dnf.conf
regexp: "^proxy_password="
line: "proxy_password={{ proxy_settings_yum_proxy_password }}"
regexp: ^proxy_password=
line: proxy_password={{ proxy_settings_yum_proxy_password }}
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'dnf' and proxy_settings_yum_proxy_password is defined

- name: Configure proxy settings for yum
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/yum.conf
regexp: "^proxy="
line: "proxy={{ proxy_settings_yum_proxy }}"
regexp: ^proxy=
line: proxy={{ proxy_settings_yum_proxy }}
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'yum' and proxy_settings_yum_proxy is defined

- name: Configure proxy_username for yum
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/yum.conf
regexp: "^proxy_username="
line: "proxy_username={{ proxy_settings_yum_proxy_username }}"
regexp: ^proxy_username=
line: proxy_username={{ proxy_settings_yum_proxy_username }}
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'yum' and proxy_settings_yum_proxy_username is defined

- name: Configure proxy_password for yum
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/yum.conf
regexp: "^proxy_password="
line: "proxy_password={{ proxy_settings_yum_proxy_password }}"
regexp: ^proxy_password=
line: proxy_password={{ proxy_settings_yum_proxy_password }}
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'yum' and proxy_settings_yum_proxy_password is defined

- name: Configure proxy settings for apt-get/aptitude
template:
ansible.builtin.template:
src: 80proxy.j2
dest: /etc/apt/apt.conf.d/80proxy
mode: u=rw,g=r,o=r
tags: proxy
when: ansible_pkg_mgr == 'apt'

- name: Configure proxy settings for Suse
template:
ansible.builtin.template:
src: proxy.j2
dest: /etc/sysconfig/proxy
mode: u=rw,g=r,o=r
Expand Down

0 comments on commit 6c01852

Please sign in to comment.