Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Hide ansible deprecation warnings in regular provision mode
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Sep 26, 2017
1 parent 57e9200 commit c89a9bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ vconfig = load_config([

provisioner = vconfig['force_ansible_local'] ? :ansible_local : vagrant_provisioner
if provisioner == :ansible
playbook = "#{host_drupalvm_dir}/provisioning/playbook.yml"
provisioning_dir = "#{host_drupalvm_dir}/provisioning"
config_dir = host_config_dir
else
playbook = "#{guest_drupalvm_dir}/provisioning/playbook.yml"
provisioning_dir = "#{guest_drupalvm_dir}/provisioning"
config_dir = guest_config_dir
end

Expand Down Expand Up @@ -103,14 +103,17 @@ Vagrant.configure('2') do |config|
end

config.vm.provision provisioner do |ansible|
ansible.playbook = playbook
ansible.playbook = "#{provisioning_dir}/playbook.yml"
ansible.extra_vars = {
config_dir: config_dir,
drupalvm_env: drupalvm_env
}
ansible.raw_arguments = Shellwords.shellsplit(ENV['DRUPALVM_ANSIBLE_ARGS']) if ENV['DRUPALVM_ANSIBLE_ARGS']
ansible.tags = ENV['DRUPALVM_ANSIBLE_TAGS']
ansible.verbose = ENV['DRUPALVM_DEBUG']
unless ENV['ANSIBLE_CONFIG']
ansible.config_file = "#{provisioning_dir}/ansible#{'.debug' if ENV['DRUPALVM_DEBUG']}.cfg"
end
# Use pip to get the latest Ansible version when using ansible_local.
provisioner == :ansible_local && ansible.install_mode = 'pip'
end
Expand Down
1 change: 1 addition & 0 deletions provisioning/ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[defaults]
roles_path = ./roles
deprecation_warnings = False

[ssh_connection]
pipelining = True
5 changes: 5 additions & 0 deletions provisioning/ansible.debug.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[defaults]
roles_path = ./roles

[ssh_connection]
pipelining = True

0 comments on commit c89a9bc

Please sign in to comment.