gogetit 0.13.1 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbfc744d5a525b73c6e5e8678f2759ed2d89c897
4
- data.tar.gz: 64f3822d9769c1b8cad49398cdad55d2e76d27b9
3
+ metadata.gz: 9ca52096bbd4bb1898a7fa7dbe799873230dbb4e
4
+ data.tar.gz: 6752f583443c97c5fdf8be54fd4b1dfa6d0bbd76
5
5
  SHA512:
6
- metadata.gz: 79f413b370f4dc96cc15e95b18ec1e454f02a41516961b97f4d7bf528abecbf1971329b622ba11d31da9da113cb8caeff149dea264b7c6d98254abf53c5d0662
7
- data.tar.gz: a9d76a466ac176a8769283d54fcb2cb38c2d2f338450373244301cef070c4c9926329ffedb86ff9b186702f3f3feaf441e2af2a7ccfa072ec7d2f5ea1a973f95
6
+ metadata.gz: af32ec2c59563b22cd3be834361c2c4c3a50f67070ab2ea5c44d87970ace9ae44721001ae45eb57d310820e68e14a239d7a14b69840feb51fe5d1006303251a2
7
+ data.tar.gz: da7f998e50f6f272ab9a87b284ef2148421d8c4d24ce5457b0189401635f98f86af06cea6d6bd87ee851400ef320474b1b508a9098e5bed3f9d8faf84f9de64c
@@ -1,3 +1,3 @@
1
1
  module Gogetit
2
- VERSION = "0.13.1"
2
+ VERSION = "0.13.2"
3
3
  end
data/lib/providers/lxd.rb CHANGED
@@ -23,14 +23,15 @@ module Gogetit
23
23
  def list_all_containers
24
24
  logger.debug("Calling <#{__method__.to_s}>")
25
25
 
26
+ nodes = []
26
27
  config[:lxd][:nodes].each do |node|
27
28
  puts "Listing LXC containers on #{node[:url]}..."
29
+
28
30
  conn = Hyperkit::Client.new(
29
31
  api_endpoint: node[:url],
30
32
  verify_ssl: false
31
33
  )
32
34
 
33
- nodes = []
34
35
  conn.containers.each do |con|
35
36
  row = {}
36
37
  row[:name] = conn.container(con).to_hash[:name]
@@ -41,15 +42,18 @@ module Gogetit
41
42
  conn.container_state(con).to_hash[:network][:eth0][:addresses][0] && \
42
43
  conn.container_state(con).to_hash[:network][:eth0][:addresses][0][:address]
43
44
  row[:ipv4] = \
45
+ # only print the first IP address on the first interface
44
46
  conn.container_state(con).to_hash[:network][:eth0][:addresses][0][:address]
45
47
  else
46
48
  row[:ipv4] = "NA"
47
49
  end
50
+ row[:host] = node[:name]
48
51
  nodes << row
49
52
  end
50
- tp nodes, :name, :status, :ipv4
51
- puts
52
53
  end
54
+ puts '-----------------------------------------------------------'
55
+ tp nodes, :name, :status, :ipv4, :host
56
+ puts
53
57
  end
54
58
 
55
59
  def list
@@ -83,8 +87,6 @@ module Gogetit
83
87
 
84
88
  args[:config] = {}
85
89
 
86
- args[:config][:"user.user-data"]['maas'] = true
87
-
88
90
  if options['no-maas']
89
91
  args[:config][:'user.user-data'] = \
90
92
  YAML.load_file(options['file'])[:config]['user.user-data']
@@ -104,10 +106,12 @@ module Gogetit
104
106
  end
105
107
  end
106
108
 
107
- args[:config][:"user.user-data"]['maas'] = true
108
109
  args[:config][:"user.user-data"]['source_image_alias'] = args[:alias]
110
+ args[:config][:"user.user-data"]['maas'] = true
109
111
  end
110
112
 
113
+ args[:config][:"user.user-data"]['gogetit'] = true
114
+
111
115
  # To disable to update apt database on first boot
112
116
  # so chef client can keep doing its job.
113
117
  args[:config][:'user.user-data']['package_update'] = false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gogetit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Draper