openstack-ansible-nspawn_co.../tests/templates/dump-container-details.sh.j2
Kevin Carter 32f3ffdcbc
Update role to gate using all supported distros
The changes here remove the boiler plate code we had in favor of using
all of our common roles. This also updates the nspawn role using some of
the learnings we've had from our recent LXC changes and ensures we're
not breaking any compatibility we had with our various distros.

Add option to run a full config update if required

> As a deployer I need the ability to make a sweeping change to container
  configs if required. At present the nspawn container create role will
  attempt to preserve the configs and update only what's required, which
  is desirable when maintaining uptime. This change provides the option
  `nspawn_container_preserve_config` which, if set to "false" will
  template the container configs instead of trying to preserve it.

Document everything in config

Change-Id: Ie969c10578e1102767ad8991c9d6171b547aef87
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-14 21:33:05 -05:00

16 lines
908 B
Django/Jinja

#!/usr/bin/env bash
# {{ ansible_managed }}
ip route list > /var/log/container-{{ inventory_hostname }}-routes.log
ip a list > /var/log/container-{{ inventory_hostname }}-links.log
ps auxfww > /var/log/container-{{ inventory_hostname }}-process.log
cat /etc/resolv.conf > /var/log/container-{{ inventory_hostname }}-resolvers.log
systemd-resolve --statistics > /var/log/container-{{ inventory_hostname }}-resolver-statistics.log
hostnamectl status > /var/log/container-{{ inventory_hostname }}-hostname-status.log
systemctl status nspawn* > /var/log/container-{{ inventory_hostname }}-nspawn-general-status.log
systemctl status systemd-nspawn* > /var/log/container-{{ inventory_hostname }}-nspawn-container-status.log
journalctl -u dnsmasq-mv-nspawn0 -n 1024 > /var/log/container-{{ inventory_hostname }}-nspawn-dnsmasq-mv-nspawn0.log
# This script collects details and exits. It will always return 0
true