Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(maintenance_11): add debian 12 vars file #51

Merged
merged 3 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@ skip_list:
- name[template]
# When we use command, we do so because the corresponding module is insufficient
- command-instead-of-module
# ansible-lint doesn't like us using vars. as a prefix for templating variables and wants us to prefix the rolename for variables. But we're using global variables not specific to a role
- var-naming
# The commits are the changelog
- galaxy[no-changelog]
# We're not 1.0.0 yet and that's ok
- galaxy[version-incorrect]
# We're using ansible 2.12 and that's ok
- meta-runtime[unsupported-version]
# The CI works just fine as it
- schema[galaxy]
# We're setting our version within the CI
- galaxy[version-missing]
2 changes: 1 addition & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
- uses: actions/checkout@v3

- name: Run ansible-lint
uses: ansible-community/ansible-lint-action@main
uses: ansible/ansible-lint@v6
with:
path: "${GITHUB_WORKSPACE}"
22 changes: 13 additions & 9 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

name: Ansible Galaxy

tags:
- linux
- infrastructure

on:
push:
tags:
Expand All @@ -12,14 +16,14 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set version in galaxy.yml
run: |
VERSION=${GITHUB_REF#refs/tags/v}
sed -re "s/^version:.*$/version: ${VERSION}/" -i galaxy.yml
- name: Set version in galaxy.yml
run: |
VERSION=${GITHUB_REF#refs/tags/v}
sed -re "s/^version:.*$/version: ${VERSION}/" -i galaxy.yml

- name: Upload collection to Ansible Galaxy
uses: ansible/[email protected]
with:
api_key: ${{ secrets.GALAXY_API_KEY }}
- name: Upload collection to Ansible Galaxy
uses: ansible/[email protected]
with:
api_key: ${{ secrets.GALAXY_API_KEY }}
5 changes: 4 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
### REQUIRED
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
Expand Down Expand Up @@ -29,7 +30,9 @@ license:

# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags: []
tags:
- linux
- infrastructure

# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---

requires_ansible: ">=2.10"
requires_ansible: ">=2.12"
1 change: 0 additions & 1 deletion roles/maintenance_10_linux/vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---

linux_allowed_login_since: -90days

3 changes: 3 additions & 0 deletions roles/maintenance_11_debian/vars/debian_12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

debian_sources_list_security_default: deb http://security.debian.org/debian-security bookworm-security main
10 changes: 5 additions & 5 deletions roles/maintenance_12_ubuntu/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
taskid: ignore-me
name: bar

#(12-010) Update package lists and check for errors `apt update`
# (12-010) Update package lists and check for errors `apt update`
- <<: *task
vars:
taskid: 12-010
Expand All @@ -22,7 +22,7 @@
changed_when: no


#(12-012) dkpg status: Are there packages which do not have the dpkg status ii or hi? `dpkg -l | grep -vE '^[hi]i'` Packages with status rc or similar can be removed completely with `dpkg -P`, be careful, usually the configuration files are removed.
# (12-012) dkpg status: Are there packages which do not have the dpkg status ii or hi? `dpkg -l | grep -vE '^[hi]i'` Packages with status rc or similar can be removed completely with `dpkg -P`, be careful, usually the configuration files are removed.
- <<: *task
vars:
taskid: 12-012
Expand All @@ -42,7 +42,7 @@
changed_when: "ubuntu_dpkg_status.stdout_lines | length > 0"


#(12-017) apt: Simulate the package upgrade `apt --simulate upgrade`.
# (12-017) apt: Simulate the package upgrade `apt --simulate upgrade`.
- <<: *task
vars:
taskid: 12-017
Expand All @@ -53,7 +53,7 @@
check_mode: yes


#(12-019) apt: Remove obsolete packages `apt autoremove`.
# (12-019) apt: Remove obsolete packages `apt autoremove`.
- <<: *task
vars:
taskid: 12-019
Expand All @@ -62,7 +62,7 @@
autoremove: yes
check_mode: yes

#(12-020) boot-config: Check boot configuration: Check ramdisk for actuality `update-initramfs -u` and keep bootloader up to date with `update-grub`.
# (12-020) boot-config: Check boot configuration: Check ramdisk for actuality `update-initramfs -u` and keep bootloader up to date with `update-grub`.
- <<: *task
vars:
taskid: 12-020
Expand Down
2 changes: 1 addition & 1 deletion roles/maintenance_15_rhel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
taskid: 15-011
name: "Does yum check-update work | Show exit status"
ansible.builtin.debug:
msg: "Exited with: {{ yum_checkupdate_output.rc }}, Error is: {{ yum_checkupdate_output.stderr_lines|default('Not available') }}"
msg: "Exited with: {{ yum_checkupdate_output.rc }}, Error is: {{ yum_checkupdate_output.stderr_lines | default('Not available') }}"
changed_when: "yum_checkupdate_output.rc not in [0, 100]"

- <<: *task
Expand Down
Loading