Skip to content

Instantly share code, notes, and snippets.

@clickfreak
Created January 12, 2015 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save clickfreak/177bf58579a7de503934 to your computer and use it in GitHub Desktop.
Save clickfreak/177bf58579a7de503934 to your computer and use it in GitHub Desktop.
HWE kernel on ubuntu precise (Ansible playbook)
---
- name: install HWE Stack on Ubuntu 12.04
hosts: all
user: someuser
sudo: yes
tasks:
- name: Install linux-hwe-generic package
apt:
name: linux-hwe-generic
state: latest
update_cache: yes
cache_valid_time: 180
when:
- ansible_distribution_release == 'precise'
register: kernel_upgrade
- name: restart server
command: shutdown -r now "Ansible updates triggered"
async: 0
poll: 0
ignore_errors: true
when:
- ansible_distribution_release == 'precise'
- kernel_upgrade|changed
- name: waiting for server to come back
connection: local
wait_for:
delay: 60
host: "{{ inventory_hostname }}"
port: 22
state: started
sudo: false
when:
- ansible_distribution_release == 'precise'
- kernel_upgrade|changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment