Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roles/edpm_bootstrap/tasks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

- name: Include packages tasks
ansible.builtin.include_tasks: packages.yml
when: not bootc
when: not ansible_local.bootc

- name: Import common post packages tasks
ansible.builtin.import_tasks: bootstrap-common-post-packages.yml

- name: Include swap tasks
ansible.builtin.include_tasks: swap.yml
when: not bootc
when: not ansible_local.bootc

- name: Import FIPS tasks
ansible.builtin.import_tasks: fips.yml
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_bootstrap/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- name: Install and enable network service
when:
- (edpm_bootstrap_legacy_network_packages | length) > 0
- not ansible_local.bootc
become: true
block:
- name: Deploy network-scripts required for deprecated network service
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_bootstrap/tasks/swap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

- name: Configure swap file
when:
- not ansible_local.bootc
- not edpm_bootstrap_swap_partition_enabled|bool
- edpm_bootstrap_swap_size_megabytes|int > 0
become: true
Expand Down
24 changes: 16 additions & 8 deletions roles/edpm_container_manage/tasks/shutdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,25 @@
loop:
- 'edpm-container-shutdown'
- 'edpm-start-podman-container'
- name: "Create /usr/lib/systemd/system/edpm-container-shutdown.service"
when: not edpm_use_bootc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need to do this even for bootc, unless we want to add it to the image build instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if we want to write them to /var/local then we can drop this.

Looks like I didn't update that commit with the new variable name anyway


- name: "Create systemd preset dir"
ansible.builtin.file:
state: "directory"
path: "/etc/systemd/system-preset"
mode: 0644

- name: "Create /etc/systemd/system/edpm-container-shutdown.service"
ansible.builtin.copy:
src: "{{ role_path }}/files/edpm-container-shutdown-service"
dest: "/usr/lib/systemd/system/edpm-container-shutdown.service"
dest: "/etc/systemd/system/edpm-container-shutdown.service"
mode: '0644'
owner: root
group: root
- name: "Create /usr/lib/systemd/system-preset/91-edpm-container-shutdown.preset"
- name: "Create /etc/systemd/system-preset/91-edpm-container-shutdown.preset"
ansible.builtin.copy:
src: "{{ role_path }}/files/91-edpm-container-shutdown-preset"
dest: "/usr/lib/systemd/system-preset/91-edpm-container-shutdown.preset"
dest: "/etc/systemd/system-preset/91-edpm-container-shutdown.preset"
mode: '0644'
owner: root
group: root
Expand All @@ -47,17 +55,17 @@
state: started
enabled: true
daemon_reload: true
- name: "Create /usr/lib/systemd/system/netns-placeholder.service"
- name: "Create /etc/systemd/system/netns-placeholder.service"
ansible.builtin.copy:
src: "{{ role_path }}/files/netns-placeholder-service"
dest: "/usr/lib/systemd/system/netns-placeholder.service"
dest: "/etc/systemd/system/netns-placeholder.service"
mode: '0644'
owner: root
group: root
- name: "Create /usr/lib/systemd/system-preset/91-netns-placeholder.preset"
- name: "Create /etc/systemd/system-preset/91-netns-placeholder.preset"
ansible.builtin.copy:
src: "{{ role_path }}/files/91-netns-placeholder-preset"
dest: "/usr/lib/systemd/system-preset/91-netns-placeholder.preset"
dest: "/etc/systemd/system-preset/91-netns-placeholder.preset"
mode: '0644'
owner: root
group: root
Expand Down
4 changes: 3 additions & 1 deletion roles/edpm_kernel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
name: "{{ edpm_kernel_extra_packages }}"
state: present
register: _install_packages_result
when: edpm_kernel_extra_packages | length > 0
when:
- edpm_kernel_extra_packages | length > 0
- not ansible_local.bootc
until: _install_packages_result is succeeded
retries: "{{ edpm_kernel_download_retries }}"
delay: "{{ edpm_kernel_download_delay }}"
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_libvirt/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
delay: "{{ edpm_libvirt_download_delay }}"
notify:
- Restart libvirt
when: not ansible_local.bootc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to install all these packages in the image don't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had a few package related changes in my Containerfile:
https://github.com/openstack-k8s-operators/edpm-image-builder/pull/39/files#diff-20143ae4d38840b7744728ec7c6720a7891a112cabf4fe01bf9d109deff67788R22-R23

Among others, like python-pyroute2 was also required for os-net-config for example.


- name: Ensure monolithic libvirt and tcp socket activation is not enabled or running
tags:
Expand Down
18 changes: 17 additions & 1 deletion roles/edpm_logrotate_crond/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@
- name: Configure tmpwatch on the host
become: true
block:
- name: Create /var/lib/openstack
ansible.builtin.file:
path: "/var/lib/openstack"
mode: 0755
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
setype: "container_file_t"

- name: Create /var/lib/openstack/cron
ansible.builtin.file:
path: "/var/lib/openstack/cron"
mode: 0644
state: directory
setype: "container_file_t"

- name: Push script
ansible.builtin.copy:
dest: /usr/local/sbin/containers-tmpwatch
dest: /var/lib/openstack/cron/containers-tmpwatch
owner: root
group: root
mode: "0755"
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_logrotate_crond/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
until: edpm_logrotate_crond_cronie_package_download is succeeded
retries: "{{ edpm_logrotate_crond_download_retries }}"
delay: "{{ edpm_logrotate_crond_download_delay }}"
when: not ansible_local.bootc

- name: Gather SELinux fact if needed
when:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_network_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
until: nm_ovs_status is succeeded
retries: "{{ edpm_network_config_download_retries }}"
delay: "{{ edpm_network_config_download_delay }}"
when: not ansible_local.bootc
- name: Restart NetworkManager after plugin installation [nmstate]
ansible.builtin.systemd:
name: NetworkManager
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_network_config/tasks/network_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
until: edpm_network_config_onc_download is succeeded
retries: "{{ edpm_network_config_download_retries }}"
delay: "{{ edpm_network_config_download_delay }}"
when: not ansible_local.bootc

- name: Ensure /var/lib/edpm-config directory exists
become: true
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_nvmeof/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
ansible.builtin.package:
name: nvme-cli
state: present
when: not ansible_local.bootc
1 change: 1 addition & 0 deletions roles/edpm_ovs/tasks/download_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
until: _install_packages_result is succeeded
retries: "{{ edpm_ovs_download_retries }}"
delay: "{{ edpm_ovs_download_delay }}"
when: not ansible_local.bootc
1 change: 1 addition & 0 deletions roles/edpm_ovs/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
until: edpm_ovs_package_install is succeeded
retries: "{{ edpm_ovs_download_retries }}"
delay: "{{ edpm_ovs_download_delay }}"
when: not ansible_local.bootc

- name: Ensure ovs services are enabled and running
tags:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_podman/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
until: edpm_podman_package_download is succeeded
retries: "{{ edpm_podman_download_retries }}"
delay: "{{ edpm_podman_download_delay }}"
when: not ansible_local.bootc

- name: Ensure we get the ansible interfaces facts
when:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_reboot/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
become: true
ansible.builtin.dnf:
name: yum-utils
when: not ansible_local.bootc

- name: Check if reboot is required with needs-restarting
ansible.builtin.command: needs-restarting -r
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_sshd/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
until: _sshd_install_result is succeeded
retries: "{{ edpm_sshd_download_retries }}"
delay: "{{ edpm_sshd_download_delay }}"
when: not ansible_local.bootc

# NOTE(mwhahaha): we need this here because in order to validate our generated
# config, we need to ensure the host keys exist
Expand Down
Loading