Skip to content

Commit a1bedf8

Browse files
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
2 parents 6de506a + 1dac201 commit a1bedf8

14 files changed

+123
-33
lines changed

.github/workflows/common_ccdc_status_checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
ref: ${{ github.head_ref }}
1616
fetch-depth: 0
17-
- uses: actions/setup-python@v4
17+
- uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.7"
2020
- name: Get the commit message

.github/workflows/lint-ansible-role.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Lint
33

4-
on: [pull_request]
4+
on: [pull_request] # yamllint disable-line rule:truthy
55

66
jobs:
77
lint:

.github/workflows/lint-dockerfiles.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ jobs:
1919
- name: Modified files
2020
id: file-changes
2121
run: |
22-
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep 'Dockerfile' | tr '\n' ' ')" >> $GITHUB_OUTPUT
22+
echo \
23+
"changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} \
24+
| grep 'Dockerfile' \
25+
| tr '\n' ' ')" \
26+
>> $GITHUB_OUTPUT
2327
2428
- name: Check GitHub event type to determine reporter type
2529
run: |

.github/workflows/lint-markdown.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ jobs:
1919
- name: Modified files
2020
id: file-changes
2121
run: |
22-
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep '\.md' | tr '\n' ' ')" >> $GITHUB_OUTPUT
22+
echo \
23+
"changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} \
24+
| grep '\.md' \
25+
| tr '\n' ' ')" \
26+
>> $GITHUB_OUTPUT
2327
2428
- name: Check GitHub event type to determine reporter type
2529
run: |

.github/workflows/lint-python.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ jobs:
2222
- name: Modified files
2323
id: file-changes
2424
run: |
25-
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep '\.py' | tr '\n' ' ')" >> $GITHUB_OUTPUT
25+
echo \
26+
"changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} \
27+
| grep '\.py' \
28+
| tr '\n' ' ')" \
29+
>> $GITHUB_OUTPUT
2630
2731
- name: Check GitHub event type to determine reporter type
2832
run: |
@@ -33,15 +37,15 @@ jobs:
3337
fi
3438
3539
- name: Set up Python environment
36-
uses: actions/setup-python@v4
40+
uses: actions/setup-python@v5
3741
with:
3842
python-version: ${{ matrix.python_version }}
3943

4044
- name: Lint Python
4145
uses: reviewdog/action-flake8@v3
4246
with:
4347
fail_on_error: false
44-
filter_mode: diff_context
48+
filter_mode: added
4549
level: error
4650
flake8_args: ${{ steps.file-changes.outputs.changed-files }}
4751
reporter: ${{ env.REVIEWDOG_REPORTER }}

.github/workflows/lint-yaml.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ jobs:
2020
- name: Modified files
2121
id: file-changes
2222
run: |
23-
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep -E "\.(yml|yaml)" | tr '\n' ' ')" >> $GITHUB_OUTPUT
23+
echo \
24+
"changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} \
25+
| grep -E "\.(yml|yaml)" \
26+
| tr '\n' ' ')" \
27+
>> $GITHUB_OUTPUT
2428
2529
- name: Check GitHub event type to determine reporter type
2630
run: |

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.trunk

.yamllint.yml

+3
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ rules:
5656
line-length:
5757
# Defaults
5858
max: 160
59+
60+
ignore:
61+
".trunk"

requirements.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
2+
roles:
23
- src: https://github.com/feffi/ansible-macos-standby.git
34
name: feffi.macos-standby
45
- src: https://github.com/feffi/ansible-macos-defaults.git
56
name: feffi.macos-defaults
6-
- src: geerlingguy.homebrew
77
- src: ccdc.package_manager_configuration
8+
9+
collections:
10+
- name: geerlingguy.mac

tasks/AlmaLinux.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- name: Set up package managers for required tools
3+
ansible.builtin.include_role:
4+
name: ccdc.package_manager_configuration
5+
6+
- name: Install desktop environment
7+
ansible.builtin.package:
8+
name: "{{ package }}"
9+
loop: "{{ desktop_packages }}"
10+
loop_control:
11+
loop_var: package
12+
become: true
13+
14+
- name: Run common Linux setup
15+
ansible.builtin.include_tasks: Linux.yml

tasks/Darwin.yml

+27-23
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
11
---
2-
- name: Disable Sleep
2+
- name: Never Sleep Mode
33
ansible.builtin.command: "{{ item }}"
44
with_items:
5+
- pmset -a standbydelay 0
6+
- pmset -a displaysleep 0
7+
- pmset -a disablesleep 1
8+
- pmset -a disksleep 0
9+
- pmset -a hibernatemode 0
10+
- pmset disablesleep 1
11+
# Not sure the stuff below works
512
- systemsetup -setsleep Never
613
- systemsetup -setharddisksleep Never
714
- systemsetup -setcomputersleep Never
815
- systemsetup -setdisplaysleep Never
916
changed_when: false
1017
become: true
1118

12-
- name: Additional cleanups for never sleep mode
19+
- name: Install Homebrew + kcpassword
1320
ansible.builtin.include_role:
14-
name: feffi.macos-standby
21+
name: geerlingguy.mac.homebrew
1522
vars:
16-
standby_delay: false # noqa: var-naming[no-role-prefix]
17-
hibernate_mode: 0 # noqa: var-naming[no-role-prefix]
18-
remove_sleepimage: true # noqa: var-naming[no-role-prefix]
23+
# This is overwritten by our group_vars (cpp.build-machines)
24+
homebrew_taps:
25+
- name: xfreebird/utils
26+
homebrew_installed_packages:
27+
- xfreebird/utils/kcpassword
1928

20-
- name: Ensure homebrew is installed
21-
ansible.builtin.include_role:
22-
name: geerlingguy.homebrew
23-
24-
- name: Add xfreebird/utils tap for kcpassword
25-
community.general.homebrew_tap:
26-
name: xfreebird/utils
27-
state: present
28-
29-
- name: Add kcpassword utility for autologin
30-
community.general.homebrew:
31-
name: kcpassword
32-
state: present
29+
# - name: Add kcpassword utility for autologin
30+
# community.general.homebrew:
31+
# name: kcpassword
32+
# state: present
33+
# become: true
3334

34-
- name: Set autoLoginUser
35+
- name: Set autoLoginUser for current user
3536
community.general.osx_defaults:
3637
domain: /Library/Preferences/com.apple.loginwindow
3738
key: autoLoginUser
3839
type: string
39-
value: vagrant
40+
value: "{{ ansible_env.USER }}"
4041
state: present
4142
become: true
4243

43-
- name: Set the autologon password # noqa: no-changed-when
44-
ansible.builtin.command: /usr/local/bin/kcpassword "vagrant"
44+
- name: Set the autologon password for current user # noqa: no-changed-when
45+
ansible.builtin.command:
46+
cmd: kcpassword "{{ ansible_env.USER }}"
47+
environment:
48+
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
4549
become: true
4650

4751
- name: Set Europe/London time zone

tasks/Debian.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: Install desktop environment
33
ansible.builtin.apt:
44
name:
5-
- ubuntu-desktop
5+
- ubuntu-desktop-minimal
66
- firefox
77
# psutil is required by ansible's dconf module
88
- python3-psutil

vars/AlmaLinux.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
gdm_config_file: /etc/gdm/custom.conf
3+
4+
desktop_packages:
5+
# EPEL is required for dkms on RedHat >=7
6+
- "epel-release"
7+
- "@Server with GUI"
8+
- "firefox"
9+
# This is required for the dconf module to disable screen locking
10+
- "python3-psutil"
11+
# DKMS will stop system updates from breaking VM guest extensions
12+
- "dkms"

vars/macos.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
terraform_ostype: "macos"
3+
ansible_ssh_transfer_method: scp
4+
# ansible_python_interpreter: /usr/local/bin/python3
5+
homebrew_user: "{{ ansible_user }}"
6+
homebrew_taps:
7+
- name: xfreebird/utils
8+
- name: xcodesorg/made
9+
current_user: "{{ lookup('env','USER') }}"
10+
11+
homebrew_installed_packages:
12+
- kcpassword
13+
- python@3
14+
- git
15+
- svn
16+
- xz
17+
- wget
18+
- jq
19+
- diffutils
20+
- graphviz
21+
- jfrog-cli
22+
- pyenv
23+
- conan@1
24+
- mariadb
25+
- tcl-tk
26+
- libomp
27+
- aria2
28+
- xcodesorg/made/xcodes
29+
- htop
30+
- mc
31+
- ncdu
32+
- dockutil
33+
- p7zip
34+
- zstd
35+
- curl
36+
- openjdk@17

0 commit comments

Comments
 (0)