foreman_remote_execution 3.3.2 → 3.3.3

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
  SHA256:
3
- metadata.gz: d093d837d0009e477549fba4700f3e0090045ba23f8b2c50fb05439fee53e403
4
- data.tar.gz: 54dffc56caa3fa1bb72bb159b152d267d2e348b64b57322ea74cdf0ad9289cc1
3
+ metadata.gz: 9caa7b15e9d581680796ce9780382a7b81a62366923aa97949b5dc4c8615696a
4
+ data.tar.gz: 9c27c825131b46779740cceb8aa78f8dcad774ead3b22068b41ff07586387dbf
5
5
  SHA512:
6
- metadata.gz: e3524503031c73f86a0f3ed0b6c8dd39499f85df47052eca941f455552665b93ff041e5d6df9870cfb95ac1219017a561a483556306905bdc005caf252a5e088
7
- data.tar.gz: 537da427406ce7c794d5e589e7e82f8c6fbda33a3a4231129905b69171421f41e98563c0496d9c7cc748f675d200729ec52f4d9067a8f7879972922358a2a868
6
+ metadata.gz: 6712bf834fa6adffa3289fdcc77cce424d035460c5dc6c7a2259c894c3b957e55624190ef86fe94786347c685c0d5249eebdc9ff3d38b4cf2721d1bcefa65fd4
7
+ data.tar.gz: 144182693223e9379d60ba6415506e1ccd30633da0a9303ae4e89565166c7ae0e300c72e17681c3092d495fc6b496b87ffa1e700c3041d4369077ecca2faa236
@@ -34,6 +34,7 @@ jobs:
34
34
  ruby-version: [2.5, 2.6]
35
35
  node-version: [12]
36
36
  steps:
37
+ - run: sudo apt-get update
37
38
  - run: sudo apt-get install build-essential libcurl4-openssl-dev zlib1g-dev libpq-dev
38
39
  - uses: actions/checkout@v2
39
40
  with:
@@ -1,9 +1,6 @@
1
- div.infoblock {
2
- margin-bottom: 20px;
3
- line-height: 2;
4
-
1
+ .target-hosts-card {
5
2
  pre {
6
- margin-top: 5px;
3
+ white-space:pre-line;
7
4
  }
8
5
  }
9
6
 
@@ -29,3 +26,7 @@ div.infoblock {
29
26
  }
30
27
  }
31
28
  }
29
+
30
+ .text_warp{
31
+ word-wrap: break-word;
32
+ }
@@ -18,14 +18,14 @@ module Api
18
18
 
19
19
  api :GET, '/job_invocations/:id', N_('Show job invocation')
20
20
  param :id, :identifier, :required => true
21
- param :host_status, String, required: false, allow_blank: true, desc: N_('Show Job status for the hosts.')
21
+ param :host_status, :bool, required: false, desc: N_('Show Job status for the hosts')
22
22
  def show
23
23
  @hosts = @job_invocation.targeting.hosts.authorized(:view_hosts, Host)
24
24
  @template_invocations = @job_invocation.template_invocations
25
25
  .where(host: @hosts)
26
26
  .includes(:input_values)
27
27
 
28
- if params[:host_status]
28
+ if params[:host_status] == 'true'
29
29
  template_invocations = @template_invocations.includes(:run_host_job_task).to_a
30
30
  @host_statuses = Hash[template_invocations.map { |ti| [ti.host_id, template_invocation_status(ti)] }]
31
31
  end
@@ -22,7 +22,7 @@ child :targeting do
22
22
  child @hosts do
23
23
  extends 'api/v2/hosts/base'
24
24
 
25
- if params[:host_status]
25
+ if params[:host_status] == 'true'
26
26
  node :job_status do |host|
27
27
  @host_statuses[host.id]
28
28
  end
@@ -1,5 +1,5 @@
1
1
  <% template_invocations = job_invocation.pattern_template_invocations %>
2
- <div class="card-pf card-pf-accented">
2
+ <div class="card-pf card-pf-accented target-hosts-card">
3
3
  <div class="card-pf-title">
4
4
  <h2 style="height: 18px;" class="card-pf-title">
5
5
  <%= _('Target hosts') %>
@@ -1,3 +1,4 @@
1
+ <% stylesheet 'foreman_remote_execution/foreman_remote_execution' %>
1
2
  <% title _('Job invocations') %>
2
3
 
3
4
  <% title_actions(job_invocations_buttons) %>
@@ -19,7 +20,7 @@
19
20
  <tbody>
20
21
  <% @job_invocations.each do |invocation| %>
21
22
  <tr>
22
- <td><%= link_to_if_authorized invocation_description(invocation), hash_for_job_invocation_path(invocation).merge(:auth_object => invocation, :permission => :view_job_invocations, :authorizer => authorizer) %></td>
23
+ <td class="text_warp"><%= link_to_if_authorized invocation_description(invocation), hash_for_job_invocation_path(invocation).merge(:auth_object => invocation, :permission => :view_job_invocations, :authorizer => authorizer) %></td>
23
24
  <td><%= trunc_with_tooltip(invocation&.targeting&.search_query, 15) %></td>
24
25
  <td><%= link_to_invocation_task_if_authorized(invocation) %></td>
25
26
  <td><%= invocation_result(invocation, :success_count) %></td>
@@ -97,6 +97,7 @@ handle_zypp_res_codes () {
97
97
  end
98
98
  end
99
99
  -%>
100
+ [ -x "$(command -v subscription-manager)" ] && subscription-manager refresh
100
101
  apt-get -y update
101
102
  apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y <%= action %> <%= input("package") %>
102
103
  <% elsif package_manager == 'zypper' -%>
@@ -13,4 +13,7 @@ template_inputs:
13
13
  provider_type: SSH
14
14
  kind: job_template
15
15
  -%>
16
+ <% if @host.operatingsystem.family == 'Debian' -%>
17
+ export PATH=/opt/puppetlabs/bin:$PATH
18
+ <% end -%>
16
19
  puppet agent --disable "<%= input("comment").present? ? input("comment") : "Disabled using Foreman Remote Execution" %> - <%= current_user %> - $(date "+%d/%m/%Y %H:%M")"
@@ -7,4 +7,7 @@ snippet: false
7
7
  provider_type: SSH
8
8
  kind: job_template
9
9
  -%>
10
+ <% if @host.operatingsystem.family == 'Debian' -%>
11
+ export PATH=/opt/puppetlabs/bin:$PATH
12
+ <% end -%>
10
13
  puppet agent --enable
@@ -33,4 +33,7 @@ template_inputs:
33
33
  provider_type: SSH
34
34
  kind: job_template
35
35
  -%>
36
+ <% if @host.operatingsystem.family == 'Debian' -%>
37
+ export PATH=/opt/puppetlabs/bin:$PATH
38
+ <% end -%>
36
39
  puppet module install <%= input('puppet_module') %> <%= "--target-dir #{input('target_dir')}" if input('target_dir').present? %> <%= "--version #{input('version')}" if input('version').present? %> <%= "--force" if input('force') == "true" %> <%= "--ignore-dependencies" if input('ignore_dependencies') == "true" %>
@@ -11,4 +11,7 @@ template_inputs:
11
11
  input_type: user
12
12
  required: false
13
13
  %>
14
+ <% if @host.operatingsystem.family == 'Debian' -%>
15
+ export PATH=/opt/puppetlabs/bin:$PATH
16
+ <% end -%>
14
17
  puppet agent --onetime --no-usecacheonfailure --no-daemonize <%= input("puppet_options") %>
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '3.3.2'.freeze
2
+ VERSION = '3.3.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-23 00:00:00.000000000 Z
11
+ date: 2020-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface