6440c6d7e6
openEuler 20.03 LTS SP2 support was removed from devstack in last few months due to its python version is too old and the CI job always fail. And openEuler 20.03 LTS SP2 was out of maintainer in May 2022 by openEuler community. The newest LTS version was released in March 2022 called 22.03 LTS. This release will be maintained for at least 2 years. And the python version is 3.9 which works well for devstack. This Patch add the openEuler distro support back. And add the related CI job to make sure its works well. Change-Id: I99c99d08b4a44d3dc644bd2e56b5ae7f7ee44210
91 lines
2.4 KiB
YAML
91 lines
2.4 KiB
YAML
- name: Ensure {{ stage_dir }}/apache exists
|
|
file:
|
|
path: "{{ stage_dir }}/apache"
|
|
state: directory
|
|
|
|
- name: Link apache logs on Debian/SuSE
|
|
block:
|
|
- name: Find logs
|
|
find:
|
|
path: "/var/log/apache2"
|
|
file_type: any
|
|
register: debian_suse_apache_logs
|
|
|
|
- name: Dereference files
|
|
stat:
|
|
path: "{{ item.path }}"
|
|
with_items: "{{ debian_suse_apache_logs.files }}"
|
|
register: debian_suse_apache_deref_logs
|
|
|
|
- name: Create hard links
|
|
file:
|
|
src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
|
|
dest: "{{ stage_dir }}/apache/{{ item.stat.path | basename }}"
|
|
state: hard
|
|
with_items: "{{ debian_suse_apache_deref_logs.results }}"
|
|
when:
|
|
- item.stat.isreg or item.stat.islnk
|
|
when: ansible_os_family in ('Debian', 'Suse')
|
|
no_log: true
|
|
|
|
- name: Link apache logs on RedHat
|
|
block:
|
|
- name: Find logs
|
|
find:
|
|
path: "/var/log/httpd"
|
|
file_type: any
|
|
register: redhat_apache_logs
|
|
|
|
- name: Dereference files
|
|
stat:
|
|
path: "{{ item.path }}"
|
|
with_items: "{{ redhat_apache_logs.files }}"
|
|
register: redhat_apache_deref_logs
|
|
|
|
- name: Create hard links
|
|
file:
|
|
src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
|
|
dest: "{{ stage_dir }}/apache/{{ item.stat.path | basename }}"
|
|
state: hard
|
|
with_items: "{{ redhat_apache_deref_logs.results }}"
|
|
when:
|
|
- item.stat.isreg or item.stat.islnk
|
|
when: ansible_os_family == 'RedHat'
|
|
no_log: true
|
|
|
|
- name: Ensure {{ stage_dir }}/apache_config apache_config exists
|
|
file:
|
|
path: "{{ stage_dir }}/apache_config"
|
|
state: directory
|
|
|
|
- name: Define config paths
|
|
set_fact:
|
|
apache_config_paths:
|
|
'Debian': '/etc/apache2/sites-enabled/'
|
|
'Suse': '/etc/apache2/conf.d/'
|
|
'RedHat': '/etc/httpd/conf.d/'
|
|
'openEuler': '/etc/httpd/conf.d/'
|
|
|
|
- name: Discover configurations
|
|
find:
|
|
path: "{{ apache_config_paths[ansible_os_family] }}"
|
|
file_type: any
|
|
register: apache_configs
|
|
no_log: true
|
|
|
|
- name: Dereference configurations
|
|
stat:
|
|
path: "{{ item.path }}"
|
|
with_items: "{{ apache_configs.files }}"
|
|
register: apache_configs_deref
|
|
no_log: true
|
|
|
|
- name: Link configurations
|
|
file:
|
|
src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
|
|
dest: "{{ stage_dir }}/apache_config/{{ item.stat.path | basename }}"
|
|
state: hard
|
|
with_items: "{{ apache_configs_deref.results }}"
|
|
when: item.stat.isreg or item.stat.islnk
|
|
no_log: true
|