Skip to content

Commit

Permalink
Merge pull request #15 from dj-wasabi/fix_molecule
Browse files Browse the repository at this point in the history
Fixing molecule
  • Loading branch information
Werner Dijkerman authored Dec 31, 2016
2 parents 5036595 + 194d3d6 commit f962f4c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ before_install:
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine

install:
- pip install molecule ansible
- pip install molecule ansible docker-py

script:
- molecule --version
- ansible --version
- molecule test

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
name=telegraf
state=restarted
enabled=yes
sudo: yes
become: yes
6 changes: 6 additions & 0 deletions molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
ansible:
playbook: playbook.yml

driver:
name: docker

verifier:
name: testinfra

docker:
containers:
- name: telegraf-centos
Expand Down
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
owner: root
group: root
mode: 0644
become: yes
when: telegraf_agent_version|version_compare('0.10.0', '<')
sudo: yes
notify: "Restart Telegraf"

- name: "Copy the template for versions >= 0.10.0"
Expand All @@ -27,8 +27,8 @@
owner: root
group: root
mode: 0644
become: yes
when: telegraf_agent_version|version_compare('0.10.0', '>=')
sudo: yes
notify: "Restart Telegraf"

- name: "Copy telegraf extra plugins"
Expand All @@ -37,8 +37,8 @@
dest: "/etc/telegraf/telegraf.d/{{ item.plugin }}.conf"
owner: root
group: root
mode: 644
mode: 0644
with_items: "{{ telegraf_plugins_extra }}"
when: "telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable"
sudo: yes
become: yes
notify: "Restart Telegraf"

0 comments on commit f962f4c

Please sign in to comment.