Skip to content

Commit

Permalink
remove special-case for firewalld in builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Mar 7, 2024
1 parent ecbfdda commit b47ff15
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
7 changes: 0 additions & 7 deletions ansible/fatimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
become: yes
gather_facts: no
tasks:
- name: Disable firewalld
# This is enabled on installation, which isn't what we want
systemd:
name: firewalld
state: stopped
enabled: false

# - import_playbook: iam.yml
- name: Install FreeIPA client
import_role:
Expand Down
14 changes: 1 addition & 13 deletions ansible/roles/firewalld/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
---
- import_tasks: install.yml

- name: Apply filewalld configs
ansible.posix.firewalld: "{{ item }}"
notify: Restart filewalld
loop: "{{ firewalld_configs }}"

- meta: flush_handlers

- name: Ensure filewalld state
ansible.builtin.systemd:
name: firewalld
state: "{{ firewalld_state }}"
enabled: "{{ firewalld_enabled | default('yes' ) }}"
- import_tasks: runtime.yml
12 changes: 12 additions & 0 deletions ansible/roles/firewalld/tasks/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: Apply filewalld configs
ansible.posix.firewalld: "{{ item }}"
notify: Restart filewalld
loop: "{{ firewalld_configs }}"

- meta: flush_handlers

- name: Ensure filewalld state
ansible.builtin.systemd:
name: firewalld
state: "{{ firewalld_state }}"
enabled: "{{ firewalld_enabled | default(true) }}"
2 changes: 2 additions & 0 deletions environments/common/inventory/group_vars/builder/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ block_devices_configurations: [] # as volumes will not be attached to Packer bui
mysql_state: stopped # as it tries to connect to real mysql node
opensearch_state: stopped # avoid writing config+certs+db into image
cuda_persistenced_state: stopped # probably don't have GPU in Packer build VMs
firewalld_enabled: false # dnf install of firewalld enables it
firewalld_state: stopped # dnf install of firewalld enables it

0 comments on commit b47ff15

Please sign in to comment.