File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed
Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def initialize
2222 @cluster = nil
2323 @nodes = { }
2424 @ansible_groups = { }
25- @multimachine_filter = ( ( [ 'up' , 'provision' ] . include? ARGV [ 0 ] ) && ARGV . length > 1 ) ? ARGV . drop ( 1 ) : [ ] # detect if running vagrant up/provision MACHINE
25+ @multimachine_filter = ( ( [ 'up' , 'provision' ] . include? ARGV [ 0 ] ) && ARGV . length > 1 && ! ARGV [ 1 ] . start_with? ( '-' ) ) ? ARGV . drop ( 1 ) : [ ] # detect if running vagrant up/provision MACHINE
2626 end
2727
2828 # Implements cluster creation, through the execution of the give code.
@@ -112,7 +112,7 @@ def debug(verbose = false)
112112 puts " group_index #{ node . group_index } "
113113 end
114114
115- filter = " (NB. filtered by #{ @cluster . multimachine_filter } )" if not @multimachine_filter . empty?
115+ filter = " (NB. filtered by #{ @multimachine_filter } )" if not @multimachine_filter . empty?
116116 puts ""
117117 puts "- ansible_groups #{ filter } "
118118
Original file line number Diff line number Diff line change @@ -17,18 +17,10 @@ class Cluster
1717 # The network domain to wich the cluster belongs (used for computing nodes fqdn)
1818 attr_accessor :domain
1919
20- # A variable that reflects if vagrant is tageting a single machine, like f.i. when executing vagrant up machine-name
21- attr_reader :multimachine_filter
22-
2320 # The root path for ansible playbook; it is used as a base path for computing ansible_group_vars and ansible_host_vars
2421 # It defaults to current directory/provisioning
2522 attr_accessor :ansible_playbook_path
2623
27- # Costruttore di una istanza di cluster.
28- def initialize ( )
29- @multimachine_filter = ""
30- end
31-
3224 # Implements cluster creation from a playbook file
3325 def from ( file )
3426 # calls vagrant-playbook utility for executing the playbook file.
@@ -147,4 +139,4 @@ def pycompose (file)
147139 end
148140 end
149141 end
150- end
142+ end
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ def initialize(name)
3939 @ansible_context_vars = { }
4040 @ansible_group_vars = { }
4141 @ansible_host_vars = { }
42- @multimachine_filter = ""
4342 @ansible_playbook_path = File . join ( Dir . pwd , 'provisioning' )
4443
4544 @name = name
You can’t perform that action at this time.
0 commit comments