$ ansible all -m ping
162.243.233.104 | success >> {
"changed": false,
"ping": "pong"
}
$ ansible all -a "/bin/hostname" master * ] 2:15 PM
162.243.233.104 | success | rc=0 >>
ubuntu-512mb-nyc2-01
[webservers]
162.243.233.104
- hosts: observatory
remote_user: root
gather_facts: false
vars:
- log_file: "/opt/observatory.log"
- server_dir: "/opt/Observatory3/"
- port: 8443
tasks:
- git:
repo='https://github.com/rcos/Observatory3.git'
version="{{ release }}"
dest="{{ server_dir }}"
- command: /usr/local/bin/npm install
args:
chdir: "{{ server_dir }}"
- command: /usr/local/bin/grunt build --force
args:
chdir: "{{ server_dir }}"
- shell: "NODE_ENV=production PORT={{ port }} forever -a -l {{ log_file }} start {{ server_dir }}dist/server/app.js"
webservers/
files/
templates/
tasks/
handlers/
vars/
defaults/
meta/