Skip to content

Instantly share code, notes, and snippets.

@weissjeffm
Created April 22, 2015 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weissjeffm/74fa6d44485c5e3888c1 to your computer and use it in GitHub Desktop.
Save weissjeffm/74fa6d44485c5e3888c1 to your computer and use it in GitHub Desktop.
- name: deploy masters
hosts: satellite-masters
vars:
master_jar: satellite-0.1.0-SNAPSHOT-standalone.jar
slave_jar: satellite-slave-0.1.0-SNAPSHOT-standalone.jar
pid_file: satellite.pid
start_script: satellite
# http_port: 80
# max_clients: 200
# remote_user: root
tasks:
- name: copy master jar
copy: src={{ reporoot }}/satellite-master/target/{{ master_jar }} dest=~/
- name: deploy slaves
hosts: satellite-slaves
tasks:
- name: copy slave jar
copy: src={{ reporoot }}/satellite-slave/target/{{ slave_jar }} dest=~/
- name: start masters
hosts: satellite-masters
tasks:
- name: place init script
template: src={{ reporoot }}/ansible/satellite.j2 dest=~/satellite mode=0755
- name: stop masters
command: ~/satellite stop
- name: start masters
command: ~/satellite start -jar {{ master_jar }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment