Skip to content

Commit

Permalink
Update playbook.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chargio authored Oct 27, 2016
1 parent 9c701e4 commit b349327
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- name: install OS packages for development
dnf: name={{ item }} state=latest
with_items:
- dnf-plugins-core
- git-all
- memcached
- postgresql-devel
Expand Down Expand Up @@ -66,4 +67,21 @@
lineinfile: dest=~/.bashrc line='export RBENV_VERSION="{{ ruby_version }}"'
- name: install ruby version {{ ruby_version }}
shell: rbenv install -s {{ ruby_version }}
- hosts: all
become: true
tasks:
- name: verify if we need to reboot
command: dnf needs-restarting
register: reboot_needed
- name: reboot machine
shell: shutdown -t 5 -r now "Rebooting as the appliance needs restarting"
async: 0
poll: 0
ignore_errors: yes
when: reboot_needed.stdout != ""
- name: waiting for server to come back
local_action: wait_for host={{ inventory_hostname }}
state=started
become: false
when: reboot_needed.stdout != ""
...

0 comments on commit b349327

Please sign in to comment.