---
- name: Install dependency packages
  sudo: yes
  apt: pkg={{item}} state=latest
  with_items:
    - sqlite3
- name: Checkout ctf-score-server
  sudo: no
  git: repo=https://github.com/yoggy/ctf-scoreserver.git dest={{ ctf_scoreserver_root }}
- name: Exec bundle install
  shell: cd {{ ctf_scoreserver_root }} && bundle install --path ./.bundle
  sudo: no
- name: Start server
  shell: (cd {{ ctf_scoreserver_root }} && nohup bundle exec ruby scoreserver.rb -o 0.0.0.0&); sleep 30
  sudo: no

---
- name: Install dependency packages
  sudo: yes
  apt: pkg={{item}} state=latest
  with_items:
    - sqlite3
- name: Checkout ctf-score-server
  sudo: no
  git: repo=https://github.com/yoggy/ctf-scoreserver.git dest={{ ctf_scoreserver_root }}
- name: Exec bundle install
  shell: cd {{ ctf_scoreserver_root }} && bundle install --path ./.bundle
  sudo: no
#- name: Kill server
#  shell: ps ax | grep "[r]uby scoreserver.rb" && ps ax | grep "[r]uby scoreserver.rb" | awk '{print $1}' | xargs kill
- name: Start server
  shell: (cd {{ ctf_scoreserver_root }} && nohup bundle exec ruby scoreserver.rb -o 0.0.0.0&); sleep 30
  sudo: no

Add server killing task but not enabled.
Add server killing task but not enabled.
