Class: RemoteLXC::RemotelxcCreate
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- RemoteLXC::RemotelxcCreate
- Includes:
- Helpers
- Defined in:
- lib/chef/knife/remotelxc_create.rb
Instance Attribute Summary collapse
-
#lxc_name ⇒ Object
readonly
Returns the value of attribute lxc_name.
Instance Method Summary collapse
-
#initialize(*args) ⇒ RemotelxcCreate
constructor
A new instance of RemotelxcCreate.
- #run ⇒ Object
Methods included from Helpers
Constructor Details
#initialize(*args) ⇒ RemotelxcCreate
Returns a new instance of RemotelxcCreate.
107 108 109 110 |
# File 'lib/chef/knife/remotelxc_create.rb', line 107 def initialize(*args) super config[:distro] = 'chef-full' end |
Instance Attribute Details
#lxc_name ⇒ Object (readonly)
Returns the value of attribute lxc_name.
105 106 107 |
# File 'lib/chef/knife/remotelxc_create.rb', line 105 def lxc_name @lxc_name end |
Instance Method Details
#run ⇒ Object
112 113 114 115 116 |
# File 'lib/chef/knife/remotelxc_create.rb', line 112 def run @lxc_name = config[:chef_node_name] = name_args.first ip_address = create_new_container bootstrap_container(ip_address) end |