Skip to content

Commit c44cb08

Browse files
author
Christopher M. Neill
committed
fix the base.yml, loggly role
1 parent 735f56b commit c44cb08

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

ansible/base.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
---
2-
- hosts: "{{ host }}"
2+
- hosts: localhost
3+
connection: local
4+
tasks:
5+
- fail: msg="`host` (target host) needs to be defined to run this role"
6+
when: host is not defined
7+
8+
- add_host:
9+
name={{ host }}
10+
groups=dock
11+
12+
- hosts: "{{ host | default('docks') }}"
313
roles:
4-
- { role: notify, tags: [ notify ], app_name: base_sshd, git_branch: latest, name: base_sshd }
5-
- { role: package-dock, tags: [dock, package] }
6-
- { role: package-aws, tags: [dock, package] }
14+
- { role: package-dock, tags: [ dock, package ] }
15+
- { role: package-aws, tags: [ dock, package ] }
716
- { role: package_ntp }
8-
- { role: docker, tags: [docker] }
9-
- { role: datadog, tags: [datadog] }
10-
- { role: ulimits, tags: [ulimits] }
11-
- { role: loggly, tags: [loggly] }
17+
- { role: docker, tags: [ docker ] }
18+
- { role: datadog, tags: [ datadog ] }
19+
- { role: ulimits, tags: [ ulimits ] }
20+
- { role: loggly, tags: [ loggly, clean ] }
1221
- { role: node }

ansible/roles/loggly/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
group=syslog
4848

4949
- name: copy app config
50+
when: name is defined
5051
tags: loggly
5152
become: true
5253
template:
@@ -70,6 +71,7 @@
7071
service: name=rsyslog state=stopped
7172

7273
- name: clear rsyslog state file
74+
when: name is defined
7375
tags: [loggly, deploy]
7476
become: true
7577
file:

0 commit comments

Comments
 (0)