From f2e9562e5fe190d44b4b1499be091b317cfa8a1d Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Tue, 14 May 2013 05:25:28 +0200 Subject: [PATCH] Add support for "ansible.start_at_task" attribute --- plugins/provisioners/ansible/config.rb | 3 +++ plugins/provisioners/ansible/provisioner.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/plugins/provisioners/ansible/config.rb b/plugins/provisioners/ansible/config.rb index 35c972877..d3a8c042b 100644 --- a/plugins/provisioners/ansible/config.rb +++ b/plugins/provisioners/ansible/config.rb @@ -10,6 +10,7 @@ module VagrantPlugins attr_accessor :sudo_user attr_accessor :verbose attr_accessor :tags + attr_accessor :start_at_task # Joker attribute, used to pass unsupported arguments to ansible anyway attr_accessor :raw_arguments @@ -24,6 +25,7 @@ module VagrantPlugins @sudo_user = UNSET_VALUE @verbose = UNSET_VALUE @tags = UNSET_VALUE + @start_at_task = UNSET_VALUE @raw_arguments = UNSET_VALUE end @@ -37,6 +39,7 @@ module VagrantPlugins @sudo_user = nil if @sudo_user == UNSET_VALUE @verbose = nil if @verbose == UNSET_VALUE @tags = nil if @tags == UNSET_VALUE + @start_at_task = nil if @start_at_task == UNSET_VALUE @raw_arguments = nil if @raw_arguments == UNSET_VALUE end diff --git a/plugins/provisioners/ansible/provisioner.rb b/plugins/provisioners/ansible/provisioner.rb index 1d06a4a18..29c08fbd4 100644 --- a/plugins/provisioners/ansible/provisioner.rb +++ b/plugins/provisioners/ansible/provisioner.rb @@ -16,6 +16,7 @@ module VagrantPlugins options << "--ask-sudo-pass" if config.ask_sudo_pass options << "--tags=#{as_list_argument(config.tags)}" if config.tags options << "--limit=#{as_list_argument(config.limit)}" if config.limit + options << "--start-at-task=#{config.start_at_task}" if config.start_at_task options << "--sudo" if config.sudo options << "--sudo-user=#{config.sudo_user}" if config.sudo_user if config.verbose