Skip to content

Commit 4b2832f

Browse files
author
Derek
committed
fix: PATH config, Chrome repo duplicates, apply:tags for all includes
PATH Configuration: - Added /etc/profile.d/dfe-path.sh for ~/.cargo/bin, ~/.local/bin, ~/.npm-global/bin - Ensures uv, claude, gext, semantic-release are in PATH for all users Chrome Repository: - Use copy module instead of apt_repository to overwrite entire file - Prevents Chrome post-install script from creating duplicate entries Ansible Tags: - Added apply:tags to ALL include_tasks in dfe_developer main.yml - Ensures child tasks run properly when using --tags Updated STATE.md with Session 5 notes including: - Telemetry disable documentation - Known git-core PPA weak key warning (Launchpad issue, cannot fix) - Verified tool versions on Ubuntu 24.04
1 parent d2a4401 commit 4b2832f

3 files changed

Lines changed: 62 additions & 6 deletions

File tree

ansible/roles/dfe_developer/tasks/chrome.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@
3535
dest: /etc/apt/keyrings/google-chrome.asc
3636
mode: '0644'
3737

38-
- name: Add Google Chrome repository
39-
ansible.builtin.apt_repository:
40-
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.asc] https://dl.google.com/linux/chrome/deb/ stable main"
41-
filename: google-chrome
42-
state: present
38+
# Chrome's post-install script adds its own repo line without signed-by
39+
# We need to ensure only our modern signed-by format is used
40+
- name: Write clean Chrome repository file (avoid duplicates)
41+
ansible.builtin.copy:
42+
content: |
43+
# Managed by DFE Developer Ansible - DO NOT EDIT
44+
# Chrome's post-install script may add duplicates, this file is cleaned on each run
45+
deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.asc] https://dl.google.com/linux/chrome/deb/ stable main
46+
dest: /etc/apt/sources.list.d/google-chrome.list
47+
mode: '0644'
4348

4449
- name: Install Google Chrome
4550
ansible.builtin.apt:

ansible/roles/dfe_developer/tasks/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@
1010
- name: Configure OS repositories (mirrors, performance)
1111
ansible.builtin.include_tasks:
1212
file: repository.yml
13+
apply:
14+
tags: ['repository']
1315
tags: ['repository']
1416

1517
- name: Configure security (automatic updates)
1618
ansible.builtin.include_tasks:
1719
file: security.yml
20+
apply:
21+
tags: ['security']
1822
tags: ['security']
1923

2024
- name: Install Docker
2125
ansible.builtin.include_tasks:
2226
file: docker.yml
27+
apply:
28+
tags: ['docker']
2329
tags: ['docker']
2430

2531
- name: Install development utilities
@@ -32,6 +38,8 @@
3238
- name: Install Python development tools
3339
ansible.builtin.include_tasks:
3440
file: uv.yml
41+
apply:
42+
tags: ['python']
3543
tags: ['python']
3644

3745
- name: Install Git and version control tools
@@ -44,27 +52,37 @@
4452
- name: Install cloud tools
4553
ansible.builtin.include_tasks:
4654
file: cloud.yml
55+
apply:
56+
tags: ['cloud']
4757
tags: ['cloud']
4858

4959
- name: Install Kubernetes tools
5060
ansible.builtin.include_tasks:
5161
file: k8s.yml
62+
apply:
63+
tags: ['k8s']
5264
tags: ['k8s']
5365

5466
- name: Install data platform tools
5567
ansible.builtin.include_tasks:
5668
file: data_tools.yml
69+
apply:
70+
tags: ['data']
5771
tags: ['data']
5872

5973
- name: Install VS Code
6074
ansible.builtin.include_tasks:
6175
file: vscode.yml
76+
apply:
77+
tags: ['vscode']
6278
tags: ['vscode']
6379
when: dfe_has_gnome | default(false)
6480

6581
- name: Install Google Chrome
6682
ansible.builtin.include_tasks:
6783
file: chrome.yml
84+
apply:
85+
tags: ['chrome']
6886
tags: ['chrome']
6987
when: dfe_has_gnome | default(false)
7088

@@ -169,9 +187,13 @@
169187
- name: Configure shell (bash history auto-commit)
170188
ansible.builtin.include_tasks:
171189
file: shell_config.yml
190+
apply:
191+
tags: ['shell']
172192
tags: ['shell']
173193

174194
- name: Verify base tools installation
175195
ansible.builtin.include_tasks:
176196
file: verify.yml
197+
apply:
198+
tags: ['verify']
177199
tags: ['verify']

ansible/roles/dfe_developer/tasks/shell_config.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
---
2-
# Shell configuration (bash history auto-commit, etc.)
2+
# Shell configuration (PATH, bash history auto-commit, etc.)
3+
4+
# ============================================================================
5+
# PATH CONFIGURATION (SYSTEM-WIDE)
6+
# Add common tool directories to PATH for all users
7+
# ============================================================================
8+
9+
- name: Configure DFE PATH additions system-wide (Linux)
10+
ansible.builtin.copy:
11+
dest: /etc/profile.d/dfe-path.sh
12+
content: |
13+
# DFE Developer Environment PATH additions
14+
# System-wide configuration for all users
15+
16+
# Add ~/.cargo/bin for UV, Rust tools
17+
if [ -d "$HOME/.cargo/bin" ]; then
18+
export PATH="$HOME/.cargo/bin:$PATH"
19+
fi
20+
21+
# Add ~/.local/bin for user-installed tools (pipx, gext, etc.)
22+
if [ -d "$HOME/.local/bin" ]; then
23+
export PATH="$HOME/.local/bin:$PATH"
24+
fi
25+
26+
# Add ~/.npm-global/bin for npm global tools (claude, semantic-release, etc.)
27+
if [ -d "$HOME/.npm-global/bin" ]; then
28+
export PATH="$HOME/.npm-global/bin:$PATH"
29+
fi
30+
mode: '0644'
31+
when: ansible_distribution in ['Fedora', 'Ubuntu']
332

433
# ============================================================================
534
# BASH HISTORY AUTO-COMMIT (SYSTEM-WIDE)

0 commit comments

Comments
 (0)