Ansible playbook: call with --verbose arg

This commit is contained in:
Przemyslaw Kaminski 2015-09-01 09:33:52 +02:00
parent f5f5271413
commit 08aa3d3edc
3 changed files with 12 additions and 13 deletions

20
Vagrantfile vendored
View File

@ -5,21 +5,17 @@
VAGRANTFILE_API_VERSION = "2"
SLAVES_COUNT = 2
solar_script = <<SCRIPT
ansible-playbook -i "localhost," -c local /vagrant/bootstrap/playbooks/solar.yml
SCRIPT
def ansible_playbook_command(filename, args=[])
"ansible-playbook -v -i \"localhost,\" -c local /vagrant/bootstrap/palybooks/${filename} ${args.join ' '}"
end
slave_script = <<SCRIPT
ansible-playbook -i "localhost," -c local /vagrant/bootstrap/playbooks/custom-configs.yml -e master_ip=10.0.0.2
SCRIPT
solar_script = ansible_playbook_command("solar.yml")
master_celery = <<SCRIPT
ansible-playbook -i "localhost," -c local /vagrant/bootstrap/playbooks/celery.yml --skip-tags slave
SCRIPT
slave_script = ansible_playbook_command("custom-configs.yml", ["-e", "master_ip=10.0.0.2"])
slave_celery = <<SCRIPT
ansible-playbook -i "localhost," -c local /vagrant/bootstrap/playbooks/celery.yml --skip-tags master
SCRIPT
master_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "slave"])
slave_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "master"])
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

View File

@ -37,7 +37,8 @@
}, {
"type": "ansible-local",
"playbook_dir": "playbooks",
"playbook_file": "playbooks/build-main.yml"
"playbook_file": "playbooks/build-main.yml",
"extra_arguments": ["--verbose"]
}],
"post-processors": [{
"type": "vagrant",

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python
import click
import sys
import time