foreman_ansible 14.1.1 → 14.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4a545f421f2f2c43e19e841ccef12f519600a76d635455a78384bec421a5a83
4
- data.tar.gz: 55ddd534490d785646a7cf7c88ba36c9e9e16502f8542615a184ecd1e00a2f02
3
+ metadata.gz: 7648a9ed44e0b236cd5bd9b81d128875f952c18f9d76756f6669b9857f86a601
4
+ data.tar.gz: 86f932aa65672a3a16f43abbafe6bc0e61209776cd12caea509c06347145ff0b
5
5
  SHA512:
6
- metadata.gz: 6d82a845c26ec335af11b373929b017cc112ef412463298c74d80efe432feb2062d51da39deacd4adc17eccc8ba17a1ac77ebd5915aaac222580b0f9d729b899
7
- data.tar.gz: 317d0658cb5b25ae49036cddef2781b46c99bd380ebf3a59066ee6d2ee94ac6e32d7364ac0593ec7f6884bf738f7310a3ca0d4633f85bd015091b8dc8404eff8
6
+ metadata.gz: 96c7621f39c1fc2d6f9f1a45e37af9b5e8d2329eb29fceef9830e05cd097893d08e649feeb154cdcb45431ddf0d6066ea30ca1c4b72cd1abc717a6ab71ce8fe6
7
+ data.tar.gz: ff6a16b61bf8444df326130b3691eb0c8d03bad58a4ed029a0555276edaca4ae3a42b4c2d40b904ef5afea2e5547fac74a9193f9ff482a9d96ff5a3b579305e2
@@ -0,0 +1,28 @@
1
+ <%#
2
+ name: Download and execute a script
3
+ job_category: Ansible Commands
4
+ description_format: Download script from %{url} and execute it
5
+ snippet: false
6
+ template_inputs:
7
+ - name: url
8
+ required: true
9
+ input_type: user
10
+ description: "URL of the script to download e.g: http://example.com/unattended/anonymous/my_script"
11
+ advanced: false
12
+ provider_type: Ansible
13
+ kind: job_template
14
+ model: JobTemplate
15
+ %>
16
+
17
+ ---
18
+ - hosts: all
19
+ tasks:
20
+ - uri:
21
+ url: <%= input("url") %>
22
+ return_content: true
23
+ register: script_response
24
+ - shell:
25
+ cmd: |
26
+ {{script_response.content}}
27
+ register: out
28
+ - debug: var=out
@@ -2,8 +2,8 @@
2
2
  <script type="text/javascript">
3
3
  $(document).ready(function () {
4
4
  var provider_type = $('#job_template_provider_type');
5
- provider_type.change(setAnsibleTabVisibilityByProvider);
6
- provider_type.change();
5
+ provider_type.trigger("change", setAnsibleTabVisibilityByProvider);
6
+ provider_type.trigger("change");
7
7
 
8
8
  function setAnsibleTabVisibilityByProvider() {
9
9
  var tab_header = $("#ansible_tab_header");
@@ -4,5 +4,5 @@
4
4
  # This way other parts of Foreman can just call ForemanAnsible::VERSION
5
5
  # and detect what version the plugin is running.
6
6
  module ForemanAnsible
7
- VERSION = '14.1.1'
7
+ VERSION = '14.2.1'
8
8
  end
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { isEqual } from 'lodash';
2
3
  import { TimesIcon, CheckIcon } from '@patternfly/react-icons';
3
4
  import { sprintf, translate as __ } from 'foremanReact/common/I18n';
4
5
 
@@ -48,7 +49,7 @@ export const onCompleted = onSubmitSuccess => response => {
48
49
  message: formatError(joinErrors(errors)),
49
50
  });
50
51
  } else {
51
- onSubmitSuccess(overridenAnsibleVariable.currentValue.value);
52
+ onSubmitSuccess(overridenAnsibleVariable.defaultValue);
52
53
  showToast({
53
54
  type: 'success',
54
55
  message: __('Ansible variable override was successfully deleted.'),
@@ -59,7 +60,7 @@ export const onCompleted = onSubmitSuccess => response => {
59
60
  export const findOverride = (variable, hostname) =>
60
61
  variable.lookupValues.nodes.find(
61
62
  item =>
62
- item.value === variable.currentValue.value &&
63
+ isEqual(item.value, variable.currentValue.value) &&
63
64
  item.match === `fqdn=${hostname}`
64
65
  );
65
66
 
@@ -309,6 +309,7 @@ export const deleteMocks = [
309
309
  overridenAnsibleVariable: {
310
310
  __typename: 'OverridenAnsibleVariable',
311
311
  id: ansibleVariableId,
312
+ defaultValue: 101,
312
313
  currentValue: {
313
314
  __typename: 'AnsibleVariableOverride',
314
315
  element: 'os',
@@ -3,6 +3,7 @@ mutation DeleteAnsibleVariableOverride($id: ID!, $hostId: Int!, $variableId: Int
3
3
  id
4
4
  overridenAnsibleVariable {
5
5
  id
6
+ defaultValue
6
7
  currentValue {
7
8
  value
8
9
  element
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_ansible
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.1.1
4
+ version: 14.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-31 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list
@@ -219,6 +219,7 @@ files:
219
219
  - app/views/foreman_ansible/job_templates/ansible_windows_updates.erb
220
220
  - app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb
221
221
  - app/views/foreman_ansible/job_templates/convert_to_rhel.erb
222
+ - app/views/foreman_ansible/job_templates/download_and_execute_script.erb
222
223
  - app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
223
224
  - app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
224
225
  - app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
@@ -495,7 +496,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
495
496
  - !ruby/object:Gem::Version
496
497
  version: '0'
497
498
  requirements: []
498
- rubygems_version: 3.2.33
499
+ rubygems_version: 3.2.3
499
500
  signing_key:
500
501
  specification_version: 4
501
502
  summary: Ansible integration with Foreman (theforeman.org)