Skip to content

Commit

Permalink
Merge pull request #146 from Capgemini/ci-tests
Browse files Browse the repository at this point in the history
Change CI tests to do ansible-lint / packer-validate
  • Loading branch information
tayzlor committed May 8, 2015
2 parents 84857e8 + 0fa390c commit 7bf0378
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ansible==1.9.0.1
ansible-lint
dopy
boto
4 changes: 2 additions & 2 deletions roles/consul/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# tasks file for consul
- name: remove consul override
command: /bin/rm -f /etc/init/consul.override
file: path=/etc/init/consul.override state=absent

- name: start consul
service: name=consul state=started
Expand All @@ -24,7 +24,7 @@
- consul

- name: remove consul-join override
command: /bin/rm -f /etc/init/consul-join.override
file: path=/etc/init/consul-join.override state=absent
when: consul_join is defined

- name: configure consul-join
Expand Down
2 changes: 1 addition & 1 deletion roles/dnsmasq/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# tasks file for dnsmasq
- name: remove dnsmasq override
command: /bin/rm -f /etc/init/dnsmasq.override
file: path=/etc/init/dnsmasq.override state=absent

- name: ensure dnsmasq is running (and enable it at boot)
service: name=dnsmasq state=started enabled=yes
Expand Down
2 changes: 1 addition & 1 deletion roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# tasks file for docker
- name: remove docker override
command: /bin/rm -f /etc/init/docker.override
file: path=/etc/init/docker.override state=absent

- name: ensure docker is running (and enable it at boot)
service: name=docker state=started enabled=yes
2 changes: 1 addition & 1 deletion roles/marathon/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
sudo: yes

- name: remove marathon override
command: /bin/rm -f /etc/init/marathon.override
file: path=/etc/init/marathon.override state=absent

- name: ensure marathon is running (and enable it at boot)
service: name=marathon state=started enabled=yes
Expand Down
4 changes: 2 additions & 2 deletions roles/mesos/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
when: mesos_install_mode == "master"

- name: remove mesos-master override
command: /bin/rm -f /etc/init/mesos-master.override
file: path=/etc/init/mesos-master.override state=absent
when: mesos_install_mode == "master"

- name: Set Mesos Master Cluster name
Expand Down Expand Up @@ -62,7 +62,7 @@
when: mesos_install_mode == "slave"

- name: remove mesos-slave override
command: /bin/rm -f /etc/init/mesos-slave.override
file: path=/etc/init/mesos-slave.override state=absent
when: mesos_install_mode == "slave"

- name: set executor registration timeout
Expand Down
22 changes: 16 additions & 6 deletions wercker.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
box: wercker/ruby
box: wercker/python
no-response-timeout: 15
build:
steps:
- bundle-install
- install-packages:
packages: wget unzip
- pip-install
- script:
name: install packer
cwd: packer/
Expand All @@ -14,10 +14,20 @@ build:
./packer version
- script:
cwd: packer/
name: validate packer template
name: validate packer template for AMI
code: ./packer validate ubuntu-14.04_amd64-amis.json
- script:
name: build image
cwd: packer/
code: |
./packer build ubuntu-14.04_amd64-amis.json
name: validate packer template for Digitalocean
code: ./packer validate ubuntu-14.04_amd64-droplet.json
- script:
cwd: packer/
name: validate packer template for Vagrant
code: ./packer validate ubuntu-14.04_amd64.json
- script:
cwd: packer/
name: validate packer template for Google
code: ./packer validate ubuntu-14.04_amd64-google.json
- capgemini/ansible-lint:
name: run ansible-lint against the site.yml playbook
playbook: site.yml

0 comments on commit 7bf0378

Please sign in to comment.