Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions ansible/base.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
---
- hosts: localhost
connection: local
tasks:
- fail: msg="`host` (target host) needs to be defined to run this role"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait nm

when: host is not defined

- add_host:
name={{ host }}
groups=dock

- hosts: "{{ host }}"
roles:
- { role: notify, tags: [ notify ], app_name: base_sshd, git_branch: latest, name: base_sshd }
- { role: package-dock, tags: [dock, package] }
- { role: package-aws, tags: [dock, package] }
- { role: package-dock, tags: [ dock, package ] }
- { role: package-aws, tags: [ dock, package ] }
- { role: package_ntp }
- { role: docker, tags: [docker] }
- { role: datadog, tags: [datadog] }
- { role: ulimits, tags: [ulimits] }
- { role: loggly, tags: [loggly] }
- { role: build_essential }
- { role: docker, tags: [ docker ] }
- { role: datadog, tags: [ datadog ] }
- { role: ulimits, tags: [ ulimits ] }
- { role: loggly, tags: [ loggly, clean ] }
- { role: node }
8 changes: 4 additions & 4 deletions ansible/roles/build_essential/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: install build essentials
become: yes
action: apt
pkg: build-essential
state: present
update_cache: yes
cache_valid_time: 604800
pkg=build-essential
state=latest
update_cache=yes
cache_valid_time=604800
2 changes: 2 additions & 0 deletions ansible/roles/loggly/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
group=syslog

- name: copy app config
when: name is defined
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when is this not defined? I would think that is an error

tags: loggly
become: true
template:
Expand All @@ -70,6 +71,7 @@
service: name=rsyslog state=stopped

- name: clear rsyslog state file
when: name is defined
tags: [loggly, deploy]
become: true
file:
Expand Down
14 changes: 11 additions & 3 deletions ansible/roles/package-dock/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
---
- name: Install make
become: true
apt:
pkg=make
state=latest
update_cache=yes
cache_valid_time=604800

- name: Install unzip
become: yes
become: true
apt:
pkg=unzip
state=latest
update_cache=yes
cache_valid_time=604800

- name: Install openjdk-7-jdk
become: yes
become: true
apt:
pkg=openjdk-7-jdk
state=latest
Expand All @@ -32,7 +40,7 @@
dest=/usr/local/bin

- name: unzip vault_0.4.1_linux_amd64.zip
become: yes
become: true
unarchive:
src=/usr/local/bin/vault_0.4.1_linux_amd64.zip
dest=/usr/local/bin
Expand Down