repo migration

This commit is contained in:
2025-05-13 08:39:58 -04:00
commit a596274ca6
9 changed files with 184 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
samples/.DS_Store
+16
View File
@@ -0,0 +1,16 @@
sonarqube-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH == 'master'
+2
View File
@@ -0,0 +1,2 @@
# Updates
+64
View File
@@ -0,0 +1,64 @@
---
- hosts: yumhosts
gather_facts: no
tasks:
- name: Update all installed packages using YUM module
ansible.builtin.yum:
use_backend: yum3
name: '*'
state: latest
update_cache: yes
update_only: yes
register: yum_update_status
- name: Remove packages not needed anymore
ansible.builtin.yum:
use_backend: yum3
autoremove: yes
- name: Reboot when packages were updated
reboot:
when: yum_update_status.changed
- hosts: plexhosts
gather_facts: no
tasks:
- name: This command will change the working directory to somedir/
ansible.builtin.shell: /usr/local/bin/update-plex.sh
#chdir: /usr/local/bin/
- hosts: debianhosts
gather_facts: no
tasks:
- name: Update all installed packages using APT module
apt:
name: '*'
state: latest
update_cache: yes
only_upgrade: yes
register: apt_update_status
- name: Remove packages not needed anymore
apt:
autoremove: yes
- name: Reboot when packages were updated
reboot:
post_reboot_delay: 60
when: apt_update_status.changed
- hosts: apkhosts
tasks:
- name: Update the Package Repositories
apk:
update_cache: yes
- name: Upgrade Packages
apk:
available: yes
upgrade: yes
#- hosts: ipkg
# tasks:
# - name: Update the Packages installed on Diskstation
# command: /opt/bin/ipkg update && /opt/bin/ipkg upgrade
#
+54
View File
@@ -0,0 +1,54 @@
---
- hosts: qemuhosts
tasks:
- name: Update all installed packages using YUM module
yum:
name: '*'
state: latest
update_cache: yes
update_only: yes
register: yum_update_status
- name: Remove packates not needed anymore
yum:
autoremove: yes
- name: Reboot when packages were updated
reboot:
when: yum_update_status.changed
- hosts: ctxhosts
tasks:
- name: Update all installed packages using APT module
apt:
name: '*'
state: latest
update_cache: yes
only_upgrade: yes
register: apt_update_status
- name: Remove packages not needed anymore
apt:
autoremove: yes
- name: Reboot when packages were updated
reboot:
post_reboot_delay: 60
when: apt_update_status.changed
- hosts: ipkg
tasks:
- name: Update the Packages installed on Diskstation
command: /opt/bin/ipkg update && /opt/bin/ipkg upgrade
- hosts: windowshosts
tasks:
- name: Install all updates and reboot as many times as needed
ansible.windows.win_updates:
category_names: '*'
reboot: yes
# Optionally, you can increase the reboot_timeout to survive long updates during reboot
- name: Ensure we wait long enough for the updates to be applied during reboot
ansible.windows.win_updates:
reboot: yes
reboot_timeout: 3600
+23
View File
@@ -0,0 +1,23 @@
---
- hosts: proxmoxhosts
tasks:
- name: Update all installed packages using APT module
apt:
name: '*'
state: latest
update_cache: yes
only_upgrade: yes
register: apt_update_status
- name: Remove packages not needed anymore
apt:
autoremove: yes
- name: Check if reboot required
stat:
path: /var/run/reboot-required
register: reboot_required_file
- name: Reboot if required
reboot:
when: reboot_required_file.stat.exists == true
+9
View File
@@ -0,0 +1,9 @@
---
- hosts: apthosts
tasks:
- name: Install a list of packages with a list variable
ansible.builtin.package:
name: "{{ packages }}"
vars:
packages:
- qemu-guest-agent
+2
View File
@@ -0,0 +1,2 @@
sonar.projectKey=wjones_updates_AYnaaRO3RhIriH2jtzo0
sonar.qualitygate.wait=true
+12
View File
@@ -0,0 +1,12 @@
---
- hosts: windowshosts
tasks:
- name: Install all updates and reboot as many times as needed
ansible.windows.win_updates:
category_names: '*'
reboot: yes
# Optionally, you can increase the reboot_timeout to survive long updates during reboot
- name: Ensure we wait long enough for the updates to be applied during reboot
ansible.windows.win_updates:
reboot: yes
reboot_timeout: 600