diff --git a/README.md b/README.md index c1e115fda..62dff5368 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,14 @@ SecGen accepts arguments to change the way that it behaves, the currently implem --esxi-no-hostname (Setting the hostname on some boxes can cause vagrant up to fail if the network configuration was not previously cleaned up.) + PROXMOX OPTIONS: + --proxmoxuser [username] + --proxmoxpass [password] + --proxmox-url [api_url] + --proxmox-node [node] + --proxmox-network [proxmox network name] + --proxmox-vlan [vlan number] + COMMANDS: run, r: Builds project and then builds the VMs build-project, p: Builds project (vagrant and puppet config), but does not build VMs diff --git a/lib/templates/Vagrantfile.erb b/lib/templates/Vagrantfile.erb index 7a3948e39..7388f9458 100644 --- a/lib/templates/Vagrantfile.erb +++ b/lib/templates/Vagrantfile.erb @@ -118,7 +118,7 @@ end proxmox.vm_id_range = 1000..999999999 proxmox.vm_memory = 3000 - proxmox.selected_node = 'vprox1' + proxmox.selected_node = '<%= @options[:proxmoxnode] %>' proxmox.disable_adjust_forwarded_port = true end # Proxmox provider end diff --git a/secgen.rb b/secgen.rb index 365b79025..aabb20638 100644 --- a/secgen.rb +++ b/secgen.rb @@ -2,7 +2,7 @@ require 'getoptlong' require 'fileutils' require 'nori' require 'open3' -require 'nokogiri/class_resolver' +# require 'nokogiri/class_resolver' require 'nokogiri' require_relative 'lib/helpers/constants.rb' @@ -77,6 +77,7 @@ def usage --proxmox-url [api_url] --proxmox-node [node] --proxmox-network [proxmox network name] + --proxmox-vlan [vlan number] COMMANDS: run, r: Builds project and then builds the VMs @@ -617,7 +618,7 @@ opts.each do |opt, arg| options[:proxmoxurl] = arg when '--proxmox-node' Print.info "Proxmox node : #{arg}" - options[:proxmoxurl] = arg + options[:proxmoxnode] = arg when '--proxmox-network' Print.info "Proxmox Network Name : #{arg}" options[:proxmoxnetwork] = arg