gogetit 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gogetit/version.rb +1 -1
- data/lib/providers/lxd.rb +10 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ca52096bbd4bb1898a7fa7dbe799873230dbb4e
|
4
|
+
data.tar.gz: 6752f583443c97c5fdf8be54fd4b1dfa6d0bbd76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af32ec2c59563b22cd3be834361c2c4c3a50f67070ab2ea5c44d87970ace9ae44721001ae45eb57d310820e68e14a239d7a14b69840feb51fe5d1006303251a2
|
7
|
+
data.tar.gz: da7f998e50f6f272ab9a87b284ef2148421d8c4d24ce5457b0189401635f98f86af06cea6d6bd87ee851400ef320474b1b508a9098e5bed3f9d8faf84f9de64c
|
data/lib/gogetit/version.rb
CHANGED
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
|