kolla-ansible/tests/post.yml
caoyuan 18bb9d1a4d Remove the duplicated task for tests/post.yml
Change-Id: Ifdf2ede2cb5f057d1d1f02bfa00ee05872e94b9f
2018-01-15 23:54:50 +08:00

37 lines
938 B
YAML

---
- hosts: all
vars:
logs_dir: "/tmp/logs"
tasks:
- name: Print all facts
copy:
content: "{{ hostvars[inventory_hostname] | to_nice_json }}"
dest: "{{ logs_dir }}/facts.json"
- name: Run diagnostics script
script: get_logs.sh
register: get_logs_result
become: true
failed_when: false
- name: Print get_logs output
debug:
msg: "{{ get_logs_result.stdout }}"
- name: Download /etc/hosts file to executor
synchronize:
src: "/etc/hosts"
dest: "{{ zuul.executor.log_root }}/{{inventory_hostname }}/"
mode: pull
ignore_errors: yes
- name: dump all iptables rules
shell: "iptables-save > /tmp/logs/iptables"
become: true
- name: Download /tmp/logs file to executor
synchronize:
src: "/tmp/logs"
dest: "{{ zuul.executor.log_root }}/{{inventory_hostname }}/"
mode: pull