foreman_ansible 11.1.0 → 11.1.1

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -9
  3. data/app/helpers/foreman_ansible/smart_proxies_helper.rb +7 -1
  4. data/app/views/foreman_ansible/config_reports/_ansible.html.erb +1 -1
  5. data/app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb +4 -32
  6. data/app/views/foreman_ansible/job_templates/smart_proxy_upgrade_-_ansible_default.erb +59 -0
  7. data/lib/foreman_ansible/version.rb +1 -1
  8. data/locale/ca/foreman_ansible.edit.po +1162 -0
  9. data/locale/ca/foreman_ansible.po.time_stamp +0 -0
  10. data/locale/cs_CZ/foreman_ansible.edit.po +1207 -0
  11. data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
  12. data/locale/de/foreman_ansible.edit.po +1148 -0
  13. data/locale/de/foreman_ansible.po.time_stamp +0 -0
  14. data/locale/en/foreman_ansible.edit.po +1146 -0
  15. data/locale/en/foreman_ansible.po.time_stamp +0 -0
  16. data/locale/en_GB/foreman_ansible.edit.po +1155 -0
  17. data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
  18. data/locale/es/foreman_ansible.edit.po +1148 -0
  19. data/locale/es/foreman_ansible.po.time_stamp +0 -0
  20. data/locale/fr/foreman_ansible.edit.po +1148 -0
  21. data/locale/fr/foreman_ansible.po.time_stamp +0 -0
  22. data/locale/gl/foreman_ansible.edit.po +1156 -0
  23. data/locale/gl/foreman_ansible.po.time_stamp +0 -0
  24. data/locale/it/foreman_ansible.edit.po +1148 -0
  25. data/locale/it/foreman_ansible.po.time_stamp +0 -0
  26. data/locale/ja/foreman_ansible.edit.po +1148 -0
  27. data/locale/ja/foreman_ansible.po.time_stamp +0 -0
  28. data/locale/ko/foreman_ansible.edit.po +1148 -0
  29. data/locale/ko/foreman_ansible.po.time_stamp +0 -0
  30. data/locale/nl_NL/foreman_ansible.edit.po +1168 -0
  31. data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
  32. data/locale/pl/foreman_ansible.edit.po +1180 -0
  33. data/locale/pl/foreman_ansible.po.time_stamp +0 -0
  34. data/locale/pt_BR/foreman_ansible.edit.po +1148 -0
  35. data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
  36. data/locale/ru/foreman_ansible.edit.po +1149 -0
  37. data/locale/ru/foreman_ansible.po.time_stamp +0 -0
  38. data/locale/sv_SE/foreman_ansible.edit.po +1180 -0
  39. data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
  40. data/locale/zh_CN/foreman_ansible.edit.po +1148 -0
  41. data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
  42. data/locale/zh_TW/foreman_ansible.edit.po +1148 -0
  43. data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
  44. data/package.json +7 -7
  45. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js +6 -2
  46. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig +151 -0
  47. data/webpack/formHelper.js +9 -4
  48. metadata +52 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c401e27d48eec2462af90e4ee0f94668b3615ef5e4ce7df7e95e1f5732364447
4
- data.tar.gz: 1644ac60d2f1b352f46ef5409960d00b64c17f2090eb235b528d88579b9fbbc6
3
+ metadata.gz: d240da772a37f88926b90ead02fae80bea4f14e257cff99873c805c7ff171a92
4
+ data.tar.gz: 00e38d4208388c1893e29f440f1afc6f4988fc31a9c1d9e1107bb337f34e14a2
5
5
  SHA512:
6
- metadata.gz: 41fc9d4cf864862b5fa562f5a507407d800962fec4f7a27535dd47850a034ee291b12757a4500ebff1c1649b3c2f83be169f1d537871e00a1472064da5907683
7
- data.tar.gz: 858837e2b4314f437b4fd361a66c657cc11ee52d4af798e1a7ac17b32443f18ce36dcd78db4004a9fc8ee1d951f56ff3e144d3fe097b699e6f673c6798bb94c3
6
+ metadata.gz: b1af6d0d6eee6c4f7ef48c22d795c6480516c1f8fa80539d64b6c6184b945af1a8a6350cfa963963b486a1b169a907efffa6573528547e1e386d47b819d96967
7
+ data.tar.gz: 2e8f162c2ec013b1bee7be62f06b77a55b0d22d57e40449e3cdb7312ff3a532fa3bb61a0b083fb7a5421d5ad33a1d7811d749e0ec4c6e95741d36bd49644da46
data/README.md CHANGED
@@ -6,21 +6,18 @@
6
6
 
7
7
  Reporting and facts import from Ansible to Foreman.
8
8
 
9
- * Main website: [theforeman.org](http://theforeman.org)
10
- * Plugin manual: [foreman_ansible manual](http://theforeman.org/plugins/foreman_ansible)
11
- * ServerFault tag: [Foreman](http://serverfault.com/questions/tagged/foreman)
12
- * Issues: [foreman ansible on Redmine](http://projects.theforeman.org/projects/ansible/issues)
13
- * Community and support: [#theforeman](https://kiwiirc.com/client/irc.freenode.net/?#theforeman) for general support, [#theforeman-dev](https://kiwiirc.com/client/irc.freenode.net/?#theforeman-dev) for development chat in [Freenode](irc.freenode.net)
14
- * Mailing lists:
15
- * [foreman-users](https://groups.google.com/forum/?fromgroups#!forum/foreman-users)
16
- * [foreman-dev](https://groups.google.com/forum/?fromgroups#!forum/foreman-dev)
9
+ * Main website: [theforeman.org](https://theforeman.org)
10
+ * Plugin manual: [foreman_ansible manual](https://theforeman.org/plugins/foreman_ansible)
11
+ * ServerFault tag: [Foreman](https://serverfault.com/questions/tagged/foreman)
12
+ * Issues: [foreman ansible on Redmine](https://projects.theforeman.org/projects/ansible/issues)
13
+ * Chat and forum: [https://theforeman.org/support.html](https://theforeman.org/support.html)
17
14
 
18
15
  ## Features
19
16
  * Import facts
20
17
  * Monitor playbook and Ansible runs runtime
21
18
  * Sends Ansible reports to Foreman that contain what changed on your system after an ansible run.
22
19
  * Stores a list of roles applicable to your hosts and 'plays' them
23
- * Looking for an Ansible dynamic inventory for Foreman? Use [foreman_ansible_inventory](https://github.com/theforeman/foreman_ansible_inventory/)
20
+ * Looking for an Ansible dynamic inventory for Foreman? Use [theforeman.foreman.foreman](https://github.com/theforeman/foreman-ansible-modules/blob/develop/plugins/inventory/foreman.py)
24
21
 
25
22
  ## Documentation (installation and configuration)
26
23
  Check out the official manual at [theforeman.org](http://theforeman.org/plugins/foreman_ansible/2.x/index.html)
@@ -27,7 +27,13 @@ module ForemanAnsible
27
27
  end
28
28
 
29
29
  def proxy_update_button(proxy)
30
- feature = RemoteExecutionFeature.feature(:ansible_run_capsule_upgrade)
30
+ name = if Foreman::Plugin.find('foreman_theme_satellite').present?
31
+ :ansible_run_capsule_upgrade
32
+ else
33
+ :ansible_run_smart_proxy_upgrade
34
+ end
35
+
36
+ feature = RemoteExecutionFeature.feature(name)
31
37
  return if feature.nil?
32
38
 
33
39
  path = new_job_invocation_path(:host_ids => proxy.infrastructure_host_facets.pluck(:host_id),
@@ -33,7 +33,7 @@
33
33
  <div class='pull-left'>
34
34
  <%= truncate(log_message, length: allowed_length) %>
35
35
  </div>
36
- <%= show_full_error_message_value(log_message) if log_message.length > allowed_length %>
36
+ <%= show_full_error_message_value(log_message) if (log_message&.length || 0) > allowed_length %>
37
37
  <% end %>
38
38
  </td>
39
39
  </tr>
@@ -1,5 +1,5 @@
1
1
  <%#
2
- name: Smart Proxy Upgrade Playbook
2
+ name: Capsule Upgrade Playbook
3
3
  snippet: false
4
4
  template_inputs:
5
5
  - name: target_version
@@ -26,8 +26,8 @@ feature: ansible_run_capsule_upgrade
26
26
  - hosts: all
27
27
  vars:
28
28
  target_version: "<%= input('target_version').present? ? input('target_version') : product_short_version %>"
29
- <% if plugin_present?('foreman_theme_satellite') -%>
30
29
  tasks:
30
+ <% if plugin_present?('foreman_theme_satellite') -%>
31
31
  - name: Gather the rpm package facts
32
32
  package_facts:
33
33
  manager: auto
@@ -75,35 +75,7 @@ feature: ansible_run_capsule_upgrade
75
75
  fail:
76
76
  msg: "Failed! Capsule server upgrade failed. See /var/log/foreman-installer/capsule.log in the Capsule server for more information"
77
77
  <% else -%>
78
- tasks:
79
- - name: Gather the rpm package facts
80
- package_facts:
81
- manager: auto
82
-
83
- - name: Fail if the target server is a Foreman server
78
+ - name: Fail if foreman_theme_satellite is missing
84
79
  fail:
85
- msg: "This playbook cannot be executed on a Foreman server. Use only on a Smart Proxy server."
86
- when: "'foreman' in ansible_facts.packages"
87
-
88
- - name: Install foreman release gpg key
89
- rpm_key:
90
- state: present
91
- key: http://yum.theforeman.org/releases/{{ target_version }}/RPM-GPG-KEY-foreman
92
- when: target_version != "nightly"
93
-
94
- - name: Update foreman repositories
95
- package:
96
- name: https://yum.theforeman.org/releases/{{ target_version }}/el{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/foreman-release.rpm
97
- state: installed
98
-
99
- - name: Clean yum metadata
100
- command: yum clean all
101
-
102
- - name: Update all packages
103
- package:
104
- name: '*'
105
- state: latest
106
-
107
- - name: Run the installer
108
- shell: foreman-installer
80
+ msg: "Failed! The plugin foreman_theme_satellite is not present. This playbook is only for use with Satellite."
109
81
  <% end -%>
@@ -0,0 +1,59 @@
1
+ <%#
2
+ name: Smart Proxy Upgrade Playbook
3
+ snippet: false
4
+ template_inputs:
5
+ - name: target_version
6
+ required: false
7
+ input_type: user
8
+ advanced: false
9
+ value_type: plain
10
+ hidden_value: false
11
+ - name: whitelist_options
12
+ required: false
13
+ input_type: user
14
+ advanced: false
15
+ value_type: plain
16
+ hidden_value: false
17
+ model: JobTemplate
18
+ job_category: Maintenance Operations
19
+ description_format: "%{template_name}"
20
+ provider_type: Ansible
21
+ kind: job_template
22
+ feature: ansible_run_smart_proxy_upgrade
23
+ %>
24
+
25
+ ---
26
+ - hosts: all
27
+ vars:
28
+ target_version: "<%= input('target_version').present? ? input('target_version') : product_short_version %>"
29
+ tasks:
30
+ - name: Gather the rpm package facts
31
+ package_facts:
32
+ manager: auto
33
+
34
+ - name: Fail if the target server is a Foreman server
35
+ fail:
36
+ msg: "This playbook cannot be executed on a Foreman server. Use only on a Smart Proxy server."
37
+ when: "'foreman' in ansible_facts.packages"
38
+
39
+ - name: Install foreman release gpg key
40
+ rpm_key:
41
+ state: present
42
+ key: http://yum.theforeman.org/releases/{{ target_version }}/RPM-GPG-KEY-foreman
43
+ when: target_version != "nightly"
44
+
45
+ - name: Update foreman repositories
46
+ package:
47
+ name: https://yum.theforeman.org/releases/{{ target_version }}/el{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/foreman-release.rpm
48
+ state: installed
49
+
50
+ - name: Clean yum metadata
51
+ command: yum clean all
52
+
53
+ - name: Update all packages
54
+ package:
55
+ name: '*'
56
+ state: latest
57
+
58
+ - name: Run the installer
59
+ shell: foreman-installer
@@ -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 = '11.1.0'
7
+ VERSION = '11.1.1'
8
8
  end