2014-03-12 19:37:15 +01:00
INVENTORY ?= inventory
VARS_FILE ?= integration_config.yml
2014-02-24 20:37:23 +01:00
all : non_destructive destructive check_mode test_hash
2014-02-20 19:00:05 +01:00
non_destructive :
2014-03-12 19:37:15 +01:00
ansible-playbook non_destructive.yml -i $( INVENTORY) -e @$( VARS_FILE) -v $( TEST_FLAGS)
2014-02-20 19:05:03 +01:00
2014-02-20 19:25:19 +01:00
destructive :
2014-03-12 19:37:15 +01:00
ansible-playbook destructive.yml -i $( INVENTORY) -e @$( VARS_FILE) -v $( TEST_FLAGS)
2014-02-20 19:25:19 +01:00
2014-02-20 22:10:44 +01:00
check_mode :
2014-03-12 19:37:15 +01:00
ansible-playbook check_mode.yml -i $( INVENTORY) -e @$( VARS_FILE) -v --check $( TEST_FLAGS)
2014-02-20 22:10:44 +01:00
2014-02-20 21:23:51 +01:00
test_hash :
2014-03-12 19:37:15 +01:00
ANSIBLE_HASH_BEHAVIOUR = replace ansible-playbook test_hash.yml -i $( INVENTORY) -v -e '{"test_hash":{"extra_args":"this is an extra arg"}}'
ANSIBLE_HASH_BEHAVIOUR = merge ansible-playbook test_hash.yml -i $( INVENTORY) -v -e '{"test_hash":{"extra_args":"this is an extra arg"}}'
2014-02-24 20:37:23 +01:00
cloud : amazon rackspace
2014-02-27 17:44:13 +01:00
cloud_cleanup : amazon_cleanup rackspace_cleanup
amazon_cleanup :
python cleanup_ec2.py -y
rackspace_cleanup :
@echo "FIXME - cleanup_rax.py not yet implemented"
@#python cleanup_rax.py -y
2014-02-24 20:37:23 +01:00
credentials.yml :
2014-03-12 19:37:15 +01:00
@echo "No credentials.yml file found. A file named 'credentials.yml' is needed to provide credentials needed to run cloud tests. See sample 'credentials.template' file."
2014-02-24 20:37:23 +01:00
@exit 1
amazon : credentials .yml
2014-03-12 19:37:15 +01:00
ansible-playbook amazon.yml -i $( INVENTORY) -e @$( VARS_FILE) -e @credentials.yml -v $( TEST_FLAGS) ; \
2014-02-27 17:44:13 +01:00
RC = $$ ? ; \
make amazon_cleanup ; \
exit $$ RC;
2014-02-24 20:37:23 +01:00
rackspace : credentials .yml
2014-03-12 19:37:15 +01:00
ansible-playbook rackspace.yml -i $( INVENTORY) -e @$( VARS_FILE) -e @credentials.yml -v $( TEST_FLAGS) ; \
2014-02-27 17:44:13 +01:00
RC = $$ ? ; \
make rackspace_cleanup ; \
exit $$ RC;