Skip to content

Commit 1557ee5

Browse files
committed
run only the setup task on travis
1 parent 2d33eaf commit 1557ee5

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ language: generic
55
python: "2.7"
66

77
env:
8-
- TEST_SETUP=tests/test_setup.yml
8+
- TEST_SETUP=tests/test.yml
99

1010
before_install:
1111
- sudo apt-get update -qq
@@ -22,5 +22,5 @@ script:
2222
# Check the role/playbook's syntax.
2323
- "ansible-playbook -i inventory $TEST_SETUP --syntax-check"
2424

25-
# Run the role/playbook with ansible-playbook.
26-
- "ansible-playbook -i inventory $TEST_SETUP --connection=local --sudo"
25+
# Run the setup role/playbook with ansible-playbook.
26+
- "ansible-playbook -i inventory $TEST_SETUP --connection=local --sudo --tags='ansible-flaskapp-setup'"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ ADD ./tests/localhosts /etc/ansible/hosts
77

88
ENV WORKDIR /build/ansible-flaskapp
99

10-
RUN ansible-playbook $WORKDIR/role.yml -c local
10+
RUN ansible-playbook $WORKDIR/role.yml -c local --tags "ansible-flaskapp-setup"

role.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
sudo: yes
66
roles:
77
- role: ./
8-
tags: ansible-flaskapp-setup

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Main entry: runs setup and deploy task
33

44
- include: setup.yml
5-
tags: ansible-flaskapp-setup
5+
tags: [ansible-flaskapp-setup]
66

77
- include: deploy.yml
8-
tags: ansible-flaskapp-deploy
8+
tags: [ansible-flaskapp-deploy]

tests/test_setup.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
sudo: yes
66
roles:
77
- role: ansible-flaskapp
8-
tags: ansible-flaskapp-setup

0 commit comments

Comments
 (0)