Skip to content

Commit 5bc3cc7

Browse files
jeremylenzclaude
authored andcommitted
Move postgresql module switch to foreman_development role
Move the dnf module switch-to task from the deploy-dev pre-tasks into the foreman_development role where it belongs alongside other dev-specific module setup like nodejs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 294b8c4 commit 5bc3cc7

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

development/playbooks/deploy-dev/deploy-dev.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515
- "../../../src/vars/foreman.yml"
1616
- "../../../src/vars/base.yaml"
1717
pre_tasks:
18-
- name: 'Switch to postgresql:16 module if needed'
19-
ansible.builtin.command: dnf module switch-to -y postgresql:16
20-
register: module_switch
21-
changed_when: "'Nothing to do' not in module_switch.stdout"
22-
failed_when: false
23-
when:
24-
- ansible_facts['os_family'] == 'RedHat'
25-
- ansible_facts['distribution_major_version'] == '9'
26-
2718
- name: Set development postgresql databases
2819
ansible.builtin.set_fact:
2920
postgresql_databases: >-

development/roles/foreman_development/tasks/main.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
---
2+
- name: 'Switch to postgresql:16 module if needed'
3+
ansible.builtin.command: dnf module switch-to -y postgresql:16
4+
register: foreman_development_postgresql_module_result
5+
changed_when: "'Nothing to do' not in foreman_development_postgresql_module_result.stdout"
6+
failed_when: false
7+
when:
8+
- ansible_facts['os_family'] == 'RedHat'
9+
- ansible_facts['distribution_major_version'] == '9'
10+
211
- name: Enable nodejs module stream
312
ansible.builtin.command:
413
cmd: dnf module enable -y nodejs:{{ foreman_development_nodejs_stream | default('22') }}

0 commit comments

Comments
 (0)