Fetch docker logs in post run
Change-Id: If025a9d3f8e2708c1bebcb2419dd840b15cab79b
This commit is contained in:
parent
ec96c5e96b
commit
87a0764cfb
@ -91,6 +91,7 @@
|
||||
s-object: false
|
||||
s-container: false
|
||||
s-proxy: false
|
||||
post-run: playbooks/zun-tempest-base/post.yaml
|
||||
|
||||
- job:
|
||||
name: zun-tempest-multinode-docker-sql
|
||||
@ -138,6 +139,7 @@
|
||||
zun: https://opendev.org/openstack/zun
|
||||
kuryr-libnetwork: https://opendev.org/openstack/kuryr-libnetwork
|
||||
devstack-plugin-container: https://opendev.org/openstack/devstack-plugin-container
|
||||
post-run: playbooks/fullstack/post.yaml
|
||||
|
||||
- project:
|
||||
templates:
|
||||
|
3
playbooks/fullstack/post.yaml
Normal file
3
playbooks/fullstack/post.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- fetch_docker_log
|
@ -1,13 +1,3 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Ensure {{ ansible_user_dir }}/logs exists
|
||||
become: True
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/logs"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
- name: Copy over docker systemd unit journals
|
||||
shell:
|
||||
cmd: |
|
||||
sudo journalctl -o short-precise --unit docker | sudo tee {{ ansible_user_dir }}/logs/docker.txt > /dev/null
|
||||
executable: /bin/bash
|
||||
roles:
|
||||
- fetch_docker_log
|
||||
|
11
roles/fetch_docker_log/tasks/main.yaml
Normal file
11
roles/fetch_docker_log/tasks/main.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
- name: Ensure {{ ansible_user_dir }}/logs exists
|
||||
become: True
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/logs"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
- name: Copy over docker systemd unit journals
|
||||
shell:
|
||||
cmd: |
|
||||
sudo journalctl -o short-precise --unit docker | sudo tee {{ ansible_user_dir }}/logs/docker.txt > /dev/null
|
||||
executable: /bin/bash
|
Loading…
Reference in New Issue
Block a user