summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/playbooks/fetch_overcloud_logs.yml25
-rw-r--r--lib/ansible/playbooks/fetch_overcloud_nodes.yml13
2 files changed, 38 insertions, 0 deletions
diff --git a/lib/ansible/playbooks/fetch_overcloud_logs.yml b/lib/ansible/playbooks/fetch_overcloud_logs.yml
new file mode 100644
index 00000000..1ab52475
--- /dev/null
+++ b/lib/ansible/playbooks/fetch_overcloud_logs.yml
@@ -0,0 +1,25 @@
+---
+- hosts: all
+ tasks:
+ - name: Archive logs
+ archive:
+ path:
+ - /var/log
+ - /etc/puppet
+ - /etc/nova
+ - /etc/neutron
+ - /etc/heat
+ - /etc/haproxy
+ - /etc/glance
+ - /etc/puppet
+ - /etc/vpp
+ - /etc/os-net-config
+ - /opt/opendaylight/data/log
+ - /opt/opendaylight/etc
+ dest: /root/logging.tar.gz
+ become: yes
+ - name: Fetch /var/log/
+ fetch:
+ src: /root/logging.tar.gz
+ dest: "{{ apex_temp_dir }}/"
+ become: yes
diff --git a/lib/ansible/playbooks/fetch_overcloud_nodes.yml b/lib/ansible/playbooks/fetch_overcloud_nodes.yml
new file mode 100644
index 00000000..bcb5f0f6
--- /dev/null
+++ b/lib/ansible/playbooks/fetch_overcloud_nodes.yml
@@ -0,0 +1,13 @@
+---
+- hosts: all
+ tasks:
+ - name: Get overcloud nodes and IPs
+ shell: "{{ stackrc }} && openstack server list -f json"
+ register: nova_list
+ - name: Write nova list output to file
+ local_action: copy content="{{ nova_list.stdout }}" dest="{{ apex_temp_dir }}/nova_output"
+ - name: Get ironic node information
+ shell: "{{ stackrc }} && openstack server list -f json"
+ register: ironic_list
+ - name: Write ironic list output to file
+ local_action: copy content="{{ ironic_list.stdout }}" dest="{{ apex_temp_dir }}/ironic_output"