Files
designate-tempest-plugin/roles/bind-logs-conf/tasks/main.yaml
Omer 61472e147b Restructure Designate CI jobs
So far the Designate and Designate tempest plugin CI jobs definition
was different than most other OSP components. Some of the jobs were
defined in the Designate repository and other in the tempest plugin,
without any clear indication to the correct repository for the job type.

By adopting a modular approach similar to other OpenStack projects,
we'll reduce maintenance overhead and allow contributors to focus on
enhancing Designate rather than debugging CI structure issues.

Goals of this restructure process:
  * Create a clear separation of job definitions between designate and
    designate-tempest-plugin repositories
  * Organize configurations into multiple files instead of single,
    monolithic one

Closes-Bug: #2106143
Change-Id: I77a963f733ff6d04a7cead92655304de80205015
Signed-off-by: Omer <oschwart@redhat.com>
2025-09-10 08:59:31 +00:00

39 lines
994 B
YAML

- name: Ensure target directory exists
file:
path: "{{ stage_dir }}/etc/bind"
state: directory
- name: Find bind config files
find:
path: /etc/bind
file_type: any
register: bind_configs
- name: Dereference bind configs
stat:
path: "{{ item.path }}"
with_items: "{{ bind_configs.files }}"
register: bind_configs_deref
- name: Link configurations
file:
src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
dest: "{{ stage_dir }}/etc/bind/{{ item.stat.path | basename }}"
state: hard
with_items: "{{ bind_configs_deref.results }}"
when: item.stat.isreg or item.stat.islnk
# NOTE(frickler) Copied from devstack role export-devstack-journal
- name: Ensure {{ stage_dir }}/logs exists
become: true
file:
path: "{{ stage_dir }}/logs"
state: directory
owner: "{{ ansible_user }}"
- name: Collect bind journal
become: true
shell:
cmd: |
journalctl -o short-precise --unit named > {{ stage_dir }}/logs/bind9.txt