foreman_ansible 13.0.7 → 14.0.0

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: 9d7d0c506666cd4761864f65b6a155a28cd48ae741affa0a1aabd4de3b847c28
4
- data.tar.gz: 81d04f4b755790f386b1f325236b2d1042134d1f7f81cbe289b297a7cacdd110
3
+ metadata.gz: 173634631b4f95f6e86f02775e026c17ba5a9a9f57d99e3f5491b57c89d8c9ca
4
+ data.tar.gz: 7dc19084e2cae6883903ef8cbb17fa221e9aea972efa851da351022989e603c8
5
5
  SHA512:
6
- metadata.gz: 3684436fa34abb2c5611c2a92e8edf713baf62700a2b3b72770bed158d8d4e67030f3517fce0807f1fbe4c2733262fac1bb484e52ea210b29d5e31d19dc74515
7
- data.tar.gz: e4ccbea0121e1ce4ab56b8db34c9fa977c2c9fd17b5fa5760194f6b028852d8bd11354b09da1de19abf8475ecd0984db23e2c45b2997488a382a60cf98c232be
6
+ metadata.gz: e16ac25e290b715368ea2d5a315aca31bd8c6723f9f19a974efedd926710c145c3f8532e33259599117d36497d7d0899783c324fa7db6ab3c2f035b2dfa4ecff
7
+ data.tar.gz: b492b84c46d9633770d1f75a7c151f7e4d55c52c1da465d834184248e66b0b1e6fe5a709376916142b29669f4bdb704ed9d5f2271be534387a3bdb86a7249adb
@@ -8,7 +8,7 @@ class UiAnsibleRolesController < ::Api::V2::BaseController
8
8
  end
9
9
 
10
10
  # restore original method from find_common to ignore resource nesting
11
- def resource_scope(options = {})
12
- @resource_scope ||= scope_for(resource_class, options)
11
+ def resource_scope(**kwargs)
12
+ @resource_scope ||= scope_for(resource_class, **kwargs)
13
13
  end
14
14
  end
@@ -1,7 +1,7 @@
1
1
  <% title _("Ansible Roles") %>
2
2
 
3
3
  <% title_actions ansible_proxy_import(hash_for_import_ansible_roles_path),
4
- documentation_button('Managing_Configurations_Ansible', type: 'docs', chapter: 'Importing_Ansible_Roles_and_Variables_ansible') %>
4
+ documentation_button('#4.1ImportingRoles', :root_url => ansible_doc_url) %>
5
5
 
6
6
  <table class="<%= table_css_classes 'table-fixed' %>">
7
7
  <thead>
@@ -7,7 +7,7 @@
7
7
  <p><%= _('No Ansible Roles were found in Foreman. If you want to assign roles to your hosts,
8
8
  you have to import them first.').html_safe %>
9
9
  </p>
10
- <p><%= link_to(_('Learn more about this in the documentation.'), documentation_url('Managing_Configurations_Ansible', type: 'docs', chapter: 'Importing_Ansible_Roles_and_Variables_ansible'), target: '_blank') %></p>
10
+ <p><%= link_to(_('Learn more about this in the documentation.'), documentation_url('#4.1ImportingRoles', :root_url => ansible_doc_url), target: '_blank') %></p>
11
11
  <div class="blank-slate-pf-secondary-action">
12
12
  <%= ansible_proxy_import(hash_for_import_ansible_roles_path) %>
13
13
  </div>
@@ -65,7 +65,7 @@
65
65
  </fieldset>
66
66
  </br>
67
67
  <fieldset>
68
- <h2><%= _("Specify Matchers") %> <%= documentation_button('Managing_Configurations_Ansible', type: 'docs', chapter: 'Overriding_Ansible_Variables_in_foreman_ansible') %></h2>
68
+ <h2><%= _("Specify Matchers") %> <%= documentation_button('4.2.6SmartMatchers') %></h2>
69
69
  <div class="children_fields lookup_values">
70
70
  <%= render 'lookup_keys/values', :f => f, :is_param => false %>
71
71
  </div>
@@ -2,7 +2,8 @@
2
2
  <%= stylesheet 'foreman_ansible/foreman-ansible' %>
3
3
 
4
4
  <%= title_actions display_link_if_authorized(_('New Ansible Variable'), hash_for_new_ansible_variable_path, :class => "btn btn-default no-float"),
5
- documentation_button('Managing_Configurations_Ansible', type: 'docs', chapter: 'Importing_Ansible_Roles_and_Variables_ansible') %>
5
+ documentation_button('#4.3Variables', :root_url => ansible_doc_url)
6
+ %>
6
7
 
7
8
  <table class="<%= table_css_classes 'table-fixed' %>">
8
9
  <thead>
@@ -19,6 +19,22 @@ template_inputs:
19
19
  options: "yes\r\nno"
20
20
  advanced: false
21
21
  value_type: plain
22
+ resource_type: Katello::ActivationKey
23
+ hidden_value: false
24
+ - name: Data telemetry
25
+ required: true
26
+ input_type: user
27
+ description: "The convert2rhel utility uploads the following data about the system
28
+ conversion to Red Hat servers for the purpose of the utility usage analysis:<br>\r\n-
29
+ The convert2rhel command as executed<br>\r\n- The convert2rhel RPM version and
30
+ GPG signature<br>\r\n- Success or failure status of the conversion<br>\r\n- Conversion
31
+ start and end timestamps<br>\r\n- Source OS vendor and version<br>\r\n- Target
32
+ RHEL version<br>\r\n- convert2rhel related environment variables<br>"
33
+ options: "yes\r\nno"
34
+ advanced: false
35
+ value_type: plain
36
+ resource_type: Katello::ActivationKey
37
+ default: 'yes'
22
38
  hidden_value: false
23
39
  model: JobTemplate
24
40
  job_category: Convert 2 RHEL
@@ -27,34 +43,21 @@ kind: job_template
27
43
  %>
28
44
  ---
29
45
  - hosts: all
46
+ <%- if input('Data telemetry') != "yes" -%>
30
47
  environment:
31
- CONVERT2RHEL_THROUGH_FOREMAN: 1
48
+ CONVERT2RHEL_DISABLE_TELEMETRY: 1
49
+ <%- end -%>
32
50
  tasks:
33
51
  - name: Install convert2rhel
34
52
  ansible.builtin.package:
35
53
  name: convert2rhel
36
54
  state: present
37
-
38
- - name: Gather package facts
39
- package_facts:
40
- manager: auto
41
-
42
- - name: Set fact for package version
43
- set_fact:
44
- convert2rhel_version: "{{ ansible_facts.packages['convert2rhel'][0].version }}"
45
- when: "'convert2rhel' in ansible_facts.packages"
46
- no_log: true
47
-
48
55
  - name: Prepopulate katello-ca-consumer
49
56
  get_url:
50
57
  url: <%= subscription_manager_configuration_url(@host) %>
51
58
  dest: /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm
52
- when:
53
- - "convert2rhel_version is version('2.0.0', '<')"
54
-
55
59
  - name: Start convert2rhel
56
- command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>"
57
-
60
+ command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>" --keep-rhsm
58
61
  <%- if input('Restart') == "yes" -%>
59
62
  - name: Reboot the machine
60
63
  reboot:
@@ -30,8 +30,7 @@ template_inputs:
30
30
  provider_type: Ansible
31
31
  kind: job_template
32
32
  model: JobTemplate
33
- %>
34
-
33
+ -%>
35
34
  # For Windows targets use the win_package module instead.
36
35
  ---
37
36
  - hosts: all
@@ -41,7 +40,7 @@ model: JobTemplate
41
40
  <%- end -%>
42
41
  tasks:
43
42
  - package:
44
- name: <%= input('name') %>
43
+ <%= indent(8) { to_yaml({"name" => input('name')}).gsub(/---\n/, '') } -%>
45
44
  state: <%= input('state') %>
46
45
  <%- if input('post_script').present? -%>
47
46
  post_tasks:
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Foreman::Plugin.register :foreman_ansible do
4
- requires_foreman '>= 3.8.1'
4
+ requires_foreman '>= 3.10.0'
5
5
  register_gettext
6
6
 
7
7
  settings do
@@ -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 = '13.0.7'
7
+ VERSION = '14.0.0'
8
8
  end
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import { Provider } from 'react-redux';
3
3
  import thunk from 'redux-thunk';
4
4
  import { applyMiddleware, createStore, compose, combineReducers } from 'redux';
@@ -42,20 +42,21 @@ export const withReactRouter = Component => props => {
42
42
  };
43
43
 
44
44
  export const withMockedProvider = Component => props => {
45
- const ForemanContext = getForemanContext(ctx);
46
- // eslint-disable-next-line react/prop-types
47
- const { mocks, ...rest } = props;
48
-
49
- const ctx = {
45
+ const [context, setContext] = useState({
50
46
  metadata: {
51
47
  UISettings: {
52
48
  perPage: 20,
53
49
  },
54
50
  },
55
- };
51
+ });
52
+ const contextData = { context, setContext };
53
+ const ForemanContext = getForemanContext(contextData);
54
+
55
+ // eslint-disable-next-line react/prop-types
56
+ const { mocks, ...rest } = props;
56
57
 
57
58
  return (
58
- <ForemanContext.Provider value={ctx}>
59
+ <ForemanContext.Provider value={contextData}>
59
60
  <MockedProvider mocks={mocks}>
60
61
  <Component {...rest} />
61
62
  </MockedProvider>
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: 13.0.7
4
+ version: 14.0.0
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-08-05 00:00:00.000000000 Z
11
+ date: 2024-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list
@@ -500,7 +500,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
500
500
  - !ruby/object:Gem::Version
501
501
  version: '0'
502
502
  requirements: []
503
- rubygems_version: 3.2.33
503
+ rubygems_version: 3.2.3
504
504
  signing_key:
505
505
  specification_version: 4
506
506
  summary: Ansible integration with Foreman (theforeman.org)