Skip to content

Commit

Permalink
Merge branch 'main' into osnet_updt
Browse files Browse the repository at this point in the history
  • Loading branch information
vcandapp authored Aug 5, 2024
2 parents 71b307b + 8615cb7 commit 7cf2ed6
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
path: "{{ edpm_derive_pci_device_spec_conf_dir }}"
setype: "container_file_t"
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
owner: "{{ ansible_user | default(ansible_user_id) }}"
group: "{{ ansible_user | default(ansible_user_id) }}"
mode: "0755"

- name: Check if edpm node has the sriov nova conf
Expand Down
4 changes: 2 additions & 2 deletions roles/edpm_extra_mounts/tasks/extra_mounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner | default(omit) }}"
group: "{{ item.group | default(omit) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default('0775') }}"
loop: "{{ edpm_default_mounts }}"
tags:
Expand Down
9 changes: 4 additions & 5 deletions roles/edpm_libvirt/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype | default('container_file_t') }}"
owner: "{{ item.owner | default(ansible_user) }}"
group: "{{ item.group | default(ansible_user) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default(omit) }}"
loop:
- {"path": "/etc/tmpfiles.d/", "owner": "root", "group": "root"}
Expand All @@ -36,9 +36,8 @@
src: "{{ item.src }}"
dest: "/etc/{{ item.dest }}"
mode: "{{ item.mode | default('0640') }}"
# FIXME: update to libvirt user/group
owner: "root"
group: "root"
owner: "{{ 'libvirt' | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ 'libvirt' | default(ansible_user) | default(ansible_user_id) }}"
loop:
- {"src": "virtlogd.conf", "dest": "libvirt/virtlogd.conf"}
- {"src": "virtnodedevd.conf", "dest": "libvirt/virtnodedevd.conf"}
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_neutron_dhcp/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# under the License.

- name: Create neutron-dhcp-agent directories
become: true
ansible.builtin.file:
path: "{{ item.path }}"
setype: "container_file_t"
Expand Down
4 changes: 2 additions & 2 deletions roles/edpm_neutron_sriov/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
path: "{{ item.path }}"
setype: "container_file_t"
state: directory
owner: "{{ item.owner | default(omit) }}"
group: "{{ item.group | default(omit) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default(omit) }}"
loop:
- {'path': "/var/lib/openstack/config/containers", "mode": "0755", "owner": "{{ ansible_user }}", "group": "{{ ansible_user }}"}
Expand Down
8 changes: 4 additions & 4 deletions roles/edpm_nova/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
path: "{{ item.path }}"
state: "directory"
setype: "container_file_t"
owner: "{{ item.owner | default(ansible_user) }}"
group: "{{ item.group | default(ansible_user) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default(omit) }}"
loop:
- {"path": "{{ edpm_nova_config_dest }}", "mode": "0755"}
Expand All @@ -87,8 +87,8 @@
path: "{{ item.path }}"
setype: "container_file_t"
state: "directory"
owner: "{{ item.owner | default(omit) }}"
group: "{{ item.group | default(omit) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default(omit) }}"
loop:
- {"path": "/var/lib/nova", "mode": "0755"}
Expand Down
11 changes: 1 addition & 10 deletions roles/edpm_nova/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@
path: "{{ edpm_nova_tls_ca_src_dir }}/tls-ca-bundle.pem"
register: ca_bundle_stat_res

# TODO(slagle) This is a temporary backwards compatible task so this can merge
# independently of the dataplane-operator change. This can be removed when
# https://github.com/openstack-k8s-operators/dataplane-operator/pull/885
# merges. Remove the check in templates/nova_compute.json.j2 as well.
- name: Check if nova-custom ca bundle exists
ansible.builtin.stat:
path: "/var/lib/openstack/cacerts/nova-custom/tls-ca-bundle.pem"
register: nova_custom_ca_bundle_stat_res

- name: Render nova container
tags:
- install
Expand All @@ -25,9 +16,9 @@
mode: "0644"
vars:
ca_bundle_exists: "{{ ca_bundle_stat_res.stat.exists }}"
nova_custom_ca_bundle_exists: "{{ nova_custom_ca_bundle_stat_res.stat.exists }}"
notify:
- Restart nova

- name: Deploy nova container
tags:
- install
Expand Down
2 changes: 0 additions & 2 deletions roles/edpm_nova/templates/nova_compute.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"/var/lib/openstack/config/nova:/var/lib/kolla/config_files:ro",
{% if ca_bundle_exists|bool %}
"{{ edpm_nova_tls_ca_src_dir }}/tls-ca-bundle.pem:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:ro,z",
{% elif nova_custom_ca_bundle_exists|bool %}
"/var/lib/openstack/cacerts/nova-custom/tls-ca-bundle.pem:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:ro,z",
{% endif %}
"/etc/localtime:/etc/localtime:ro",
"/lib/modules:/lib/modules:ro",
Expand Down
8 changes: 4 additions & 4 deletions roles/edpm_swift/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
path: "{{ item.path }}"
state: "directory"
setype: "container_file_t"
owner: "{{ item.owner | default(ansible_user) }}"
group: "{{ item.group | default(ansible_user) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default(omit) }}"
loop:
- {"path": "{{ edpm_swift_config_dest }}", "mode": "0755"}
Expand All @@ -49,8 +49,8 @@
path: "{{ item.path }}"
state: "directory"
setype: "container_file_t"
owner: "{{ item.owner | default(ansible_user) }}"
group: "{{ item.group | default(ansible_user) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
mode: "{{ item.mode | default(omit) }}"
loop:
- {"path": "/srv/node", "mode": "0750", "owner": "swift", "group": "swift"}
Expand Down
2 changes: 0 additions & 2 deletions roles/edpm_telemetry/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
name: "osp.edpm.edpm_telemetry"
vars:
telemetry_test: true
ansible_user: root
ansible_user_dir: /root
2 changes: 0 additions & 2 deletions roles/edpm_telemetry_logging/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
name: "osp.edpm.edpm_telemetry_logging"
vars:
telemetry_test: true
ansible_user: root
ansible_user_dir: /root
1 change: 1 addition & 0 deletions roles/edpm_telemetry_logging/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
remote_src: "{{ telemetry_test | default('false') }}"

- name: Deploy rsyslog configuration
become: true
ansible.builtin.copy:
src: "{{ edpm_telemetry_logging_config_src }}/10-telemetry.conf"
dest: "{{ edpm_telemetry_rsyslog_config_dest }}/10-telemetry.conf"
Expand Down
4 changes: 2 additions & 2 deletions roles/edpm_users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner | default(omit) }}"
group: "{{ item.group | default(omit) }}"
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
setype: "{{ item.setype | default(omit) }}"
seuser: "{{ item.seuser | default(omit) }}"
mode: "{{ item.mode | default(omit) }}"
Expand Down

0 comments on commit 7cf2ed6

Please sign in to comment.