itamae 1.1.25 → 1.1.26
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 +4 -4
- data/Rakefile +2 -0
- data/lib/itamae/logger.rb +8 -0
- data/lib/itamae/resource/base.rb +26 -29
- data/lib/itamae/version.txt +1 -1
- 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: fb27312cdd1e4cbfccca56ee5eb7a85e48188d2a
|
4
|
+
data.tar.gz: 164226caebc7e74dad4d9584f694b03b07bfd61f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6b7ac732a3b58aea5425e075ce7b787be1167cf38dc85a19300ec256bf6af4d9e0dd1e66ed33cc5fb5ba5ece0a76cbcb583a07895269119ad53dea55667a254
|
7
|
+
data.tar.gz: b510acec0c54fee7d6bfcca40c5fec9129f41b3ffe307dfaa2046f4dcf60f0b9b8e02bdb868a8d54bfab3d81bbf9aebbd6847b762ef5672f54a7d4af5d17d432
|
data/Rakefile
CHANGED
data/lib/itamae/logger.rb
CHANGED
data/lib/itamae/resource/base.rb
CHANGED
@@ -118,24 +118,22 @@ module Itamae
|
|
118
118
|
def run(specific_action = nil, options = {})
|
119
119
|
Logger.debug "#{resource_type}[#{resource_name}]"
|
120
120
|
|
121
|
-
Logger.formatter.
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
end
|
130
|
-
|
131
|
-
[specific_action || attributes.action].flatten.each do |action|
|
132
|
-
run_action(action, options)
|
133
|
-
end
|
121
|
+
Logger.formatter.with_indent_if(Logger.debug?) do
|
122
|
+
if do_not_run_because_of_only_if?
|
123
|
+
Logger.debug "#{resource_type}[#{resource_name}] Execution skipped because of only_if attribute"
|
124
|
+
return
|
125
|
+
elsif do_not_run_because_of_not_if?
|
126
|
+
Logger.debug "#{resource_type}[#{resource_name}] Execution skipped because of not_if attribute"
|
127
|
+
return
|
128
|
+
end
|
134
129
|
|
135
|
-
|
136
|
-
|
130
|
+
[specific_action || attributes.action].flatten.each do |action|
|
131
|
+
run_action(action, options)
|
132
|
+
end
|
137
133
|
|
138
|
-
|
134
|
+
verify unless options[:dry_run]
|
135
|
+
notify(options) if updated?
|
136
|
+
end
|
139
137
|
rescue Backend::CommandExecutionError
|
140
138
|
Logger.error "#{resource_type}[#{resource_name}] Failed."
|
141
139
|
exit 2
|
@@ -170,23 +168,22 @@ module Itamae
|
|
170
168
|
|
171
169
|
return if action == :nothing
|
172
170
|
|
173
|
-
Logger.formatter.
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
Logger.debug "(in set_current_attributes)"
|
178
|
-
set_current_attributes
|
171
|
+
Logger.formatter.with_indent_if(Logger.debug?) do
|
172
|
+
Logger.debug "(in pre_action)"
|
173
|
+
pre_action
|
179
174
|
|
180
|
-
|
181
|
-
|
175
|
+
Logger.debug "(in set_current_attributes)"
|
176
|
+
set_current_attributes
|
182
177
|
|
183
|
-
|
184
|
-
|
185
|
-
end
|
178
|
+
Logger.debug "(in show_differences)"
|
179
|
+
show_differences
|
186
180
|
|
187
|
-
|
181
|
+
unless options[:dry_run]
|
182
|
+
public_send("action_#{action}".to_sym, options)
|
183
|
+
end
|
188
184
|
|
189
|
-
|
185
|
+
updated! if different?
|
186
|
+
end
|
190
187
|
|
191
188
|
@current_action = nil
|
192
189
|
end
|
data/lib/itamae/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.26
|