Hi,

I am writing a role to setup ‘things’ on amazon ami (redhat based I suppose).

I have a yum upgrade step on it like so:

- name: upgrade all base packages
  yum: name=* state=latest

then ‘other stuff gets done’ like installing some additional software.

I want to put this next step in place to check if kernel version has changed or 
not and if so, reboot the server.

- name: Check what the new version is
  shell:  lsb_release -r | awk '{print $2}'
  register: new_release

- name: Reboot
  command: /sbin/reboot -t now
  when: {{ amzn_base_lsb_release }} != new_release.stdout

# amzn_base_lsb_release = defined in defaults/main.yml

Q: Is there a way for me to define this as the last step?
(this is a role and this task in defined in tasks/RedHat.yml inherited by 
tasks/main.yml)


Thanks in advance!

Yes, I’m going to release this as soon as it gets right (well, its my first 
role) :)

Cheers,
Frank

-- 
Change is the essential process of all existence.
-- Spock, "Let That Be Your Last Battlefield", stardate 5730.2

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/etPan.53f62bbf.6b8b4567.4eca%40Franciscos-MacBook-Air.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to