Skip to content

Commit 38f293a

Browse files
author
Derek
committed
fix: Add RDP role, GNOME defaults, package lock protection, and CI workflow
- Replace dfe_rdp_optimizer with streamlined dfe_rdp role - Add system-wide GNOME dconf defaults (dark theme, fonts, dock) - Stop automatic updates during playbook to prevent lock conflicts - Re-enable automatic updates in cleanup role - Add APT/DNF lock wait protection to cleanup tasks - Add semantic-release GitHub Actions workflow for automated versioning - Add remmina RDP client via Flatpak
1 parent a080cc9 commit 38f293a

22 files changed

Lines changed: 1362 additions & 47 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Project: DFE Developer
2+
# File: .github/workflows/semantic-release.yml
3+
# Purpose: Create version tags using semantic-release
4+
# License: MIT
5+
# Copyright: (c) 2025 HyperSec Pty Ltd
6+
7+
name: Semantic Release
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: write
17+
issues: write
18+
pull-requests: write
19+
20+
jobs:
21+
release:
22+
name: Create Version and Tag
23+
runs-on: ${{ vars.GH_RUNNER_DEFAULT || 'ubuntu-latest' }}
24+
25+
steps:
26+
- name: Generate GitHub App Token
27+
id: app-token
28+
uses: actions/create-github-app-token@v1
29+
with:
30+
app-id: ${{ secrets.GH_APP_ID }}
31+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
32+
owner: ${{ github.repository_owner }}
33+
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
fetch-tags: true
39+
token: ${{ steps.app-token.outputs.token }}
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '22'
45+
46+
- name: Install semantic-release
47+
run: |
48+
npm install -g \
49+
semantic-release@latest \
50+
@semantic-release/changelog@latest \
51+
@semantic-release/commit-analyzer@latest \
52+
@semantic-release/release-notes-generator@latest \
53+
@semantic-release/exec@latest \
54+
@semantic-release/git@latest \
55+
@semantic-release/github@latest \
56+
conventional-changelog-conventionalcommits@latest
57+
58+
- name: Run semantic-release
59+
env:
60+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
61+
run: |
62+
semantic-release
63+
64+
# Check if a version was created
65+
if [ -f VERSION ]; then
66+
VERSION=$(cat VERSION)
67+
echo "Released version: ${VERSION}"
68+
else
69+
echo "No version created (no releasable commits)"
70+
fi

ansible/playbooks/main.yml

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,74 @@
2121
Python: {{ ansible_python_version }}
2222
tags: ['always']
2323

24+
# Wait for package manager locks (handles automatic updates in progress)
25+
- name: Wait for APT lock to be released (Ubuntu)
26+
ansible.builtin.shell: |
27+
while fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1 || fuser /var/lib/apt/lists/lock >/dev/null 2>&1; do
28+
echo "Waiting for APT lock..."
29+
sleep 5
30+
done
31+
echo "APT lock released"
32+
args:
33+
executable: /bin/bash
34+
register: apt_lock_wait
35+
changed_when: false
36+
when: ansible_distribution == 'Ubuntu'
37+
retries: 30
38+
delay: 10
39+
until: apt_lock_wait.rc == 0
40+
tags: ['always']
41+
42+
- name: Wait for DNF lock to be released (Fedora)
43+
ansible.builtin.shell: |
44+
while pgrep -x dnf >/dev/null 2>&1 || [ -f /var/run/dnf.pid ]; do
45+
echo "Waiting for DNF lock..."
46+
sleep 5
47+
done
48+
echo "DNF lock released"
49+
args:
50+
executable: /bin/bash
51+
register: dnf_lock_wait
52+
changed_when: false
53+
when: ansible_distribution == 'Fedora'
54+
retries: 30
55+
delay: 10
56+
until: dnf_lock_wait.rc == 0
57+
tags: ['always']
58+
59+
# Stop automatic updates during playbook to prevent lock conflicts
60+
- name: Stop unattended-upgrades service (Ubuntu)
61+
ansible.builtin.systemd:
62+
name: unattended-upgrades
63+
state: stopped
64+
when: ansible_distribution == 'Ubuntu'
65+
become: true
66+
failed_when: false
67+
tags: ['always']
68+
69+
- name: Stop apt-daily services (Ubuntu)
70+
ansible.builtin.systemd:
71+
name: "{{ item }}"
72+
state: stopped
73+
loop:
74+
- apt-daily.service
75+
- apt-daily-upgrade.service
76+
- apt-daily.timer
77+
- apt-daily-upgrade.timer
78+
when: ansible_distribution == 'Ubuntu'
79+
become: true
80+
failed_when: false
81+
tags: ['always']
82+
83+
- name: Stop dnf-automatic timer (Fedora)
84+
ansible.builtin.systemd:
85+
name: dnf-automatic.timer
86+
state: stopped
87+
when: ansible_distribution == 'Fedora'
88+
become: true
89+
failed_when: false
90+
tags: ['always']
91+
2492
- name: Validate supported operating system
2593
ansible.builtin.fail:
2694
msg: "Unsupported OS: {{ ansible_distribution }} {{ ansible_distribution_version }}. Supported: Fedora 42+, Ubuntu 24.04+, macOS"
@@ -90,9 +158,9 @@
90158
become: "{{ ansible_distribution != 'MacOSX' }}"
91159
tags: ['vm', 'optimizer']
92160

93-
- role: dfe_rdp_optimizer
161+
- role: dfe_rdp
94162
become: "{{ ansible_distribution != 'MacOSX' }}"
95-
tags: ['rdp', 'optimizer']
163+
tags: ['rdp']
96164

97165
- role: dfe_system_cleanup
98166
become: "{{ ansible_distribution != 'MacOSX' }}"

ansible/roles/dfe_developer/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ dfe_min_ubuntu_version: "24.04"
1717
# Ghostty installation
1818
dfe_install_ghostty: true
1919

20+
# GNOME Shell customizations (Dash to Panel, system monitor, dark theme, etc.)
21+
# Set to false to keep vanilla Ubuntu/Fedora GNOME experience
22+
dfe_customize_gnome_shell: true
23+
2024
# Docker configuration
2125
dfe_docker_users:
2226
- "{{ ansible_user_id }}"

0 commit comments

Comments
 (0)