Skip to content

Instantly share code, notes, and snippets.

@sshnaidm
Last active June 15, 2016 22:30
Show Gist options
  • Save sshnaidm/0296ab76a77618ce567c0319cc5e80b1 to your computer and use it in GitHub Desktop.
Save sshnaidm/0296ab76a77618ce567c0319cc5e80b1 to your computer and use it in GitHub Desktop.
restarting services on all overcloud nodes
for server in $(grep controller /etc/hosts | grep 192.0. | awk {'print $3'}); do ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -ttt heat-admin@$server "for service in \$(sudo systemctl list-units | grep openstack-heat | awk {'print \$1'}); do echo Restarting \$service; sudo systemctl restart \$service; done"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment