foreman_ansible 11.1.0 → 11.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -9
- data/app/helpers/foreman_ansible/smart_proxies_helper.rb +7 -1
- data/app/views/foreman_ansible/config_reports/_ansible.html.erb +1 -1
- data/app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb +4 -32
- data/app/views/foreman_ansible/job_templates/smart_proxy_upgrade_-_ansible_default.erb +59 -0
- data/lib/foreman_ansible/version.rb +1 -1
- data/locale/ca/foreman_ansible.edit.po +1162 -0
- data/locale/ca/foreman_ansible.po.time_stamp +0 -0
- data/locale/cs_CZ/foreman_ansible.edit.po +1207 -0
- data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
- data/locale/de/foreman_ansible.edit.po +1148 -0
- data/locale/de/foreman_ansible.po.time_stamp +0 -0
- data/locale/en/foreman_ansible.edit.po +1146 -0
- data/locale/en/foreman_ansible.po.time_stamp +0 -0
- data/locale/en_GB/foreman_ansible.edit.po +1155 -0
- data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
- data/locale/es/foreman_ansible.edit.po +1148 -0
- data/locale/es/foreman_ansible.po.time_stamp +0 -0
- data/locale/fr/foreman_ansible.edit.po +1148 -0
- data/locale/fr/foreman_ansible.po.time_stamp +0 -0
- data/locale/gl/foreman_ansible.edit.po +1156 -0
- data/locale/gl/foreman_ansible.po.time_stamp +0 -0
- data/locale/it/foreman_ansible.edit.po +1148 -0
- data/locale/it/foreman_ansible.po.time_stamp +0 -0
- data/locale/ja/foreman_ansible.edit.po +1148 -0
- data/locale/ja/foreman_ansible.po.time_stamp +0 -0
- data/locale/ko/foreman_ansible.edit.po +1148 -0
- data/locale/ko/foreman_ansible.po.time_stamp +0 -0
- data/locale/nl_NL/foreman_ansible.edit.po +1168 -0
- data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
- data/locale/pl/foreman_ansible.edit.po +1180 -0
- data/locale/pl/foreman_ansible.po.time_stamp +0 -0
- data/locale/pt_BR/foreman_ansible.edit.po +1148 -0
- data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
- data/locale/ru/foreman_ansible.edit.po +1149 -0
- data/locale/ru/foreman_ansible.po.time_stamp +0 -0
- data/locale/sv_SE/foreman_ansible.edit.po +1180 -0
- data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
- data/locale/zh_CN/foreman_ansible.edit.po +1148 -0
- data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
- data/locale/zh_TW/foreman_ansible.edit.po +1148 -0
- data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
- data/package.json +7 -7
- data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js +6 -2
- data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig +151 -0
- data/webpack/formHelper.js +9 -4
- metadata +52 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d240da772a37f88926b90ead02fae80bea4f14e257cff99873c805c7ff171a92
|
4
|
+
data.tar.gz: 00e38d4208388c1893e29f440f1afc6f4988fc31a9c1d9e1107bb337f34e14a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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](
|
10
|
-
* Plugin manual: [foreman_ansible manual](
|
11
|
-
* ServerFault tag: [Foreman](
|
12
|
-
* Issues: [foreman ansible on Redmine](
|
13
|
-
*
|
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 [
|
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
|
-
|
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
|
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:
|
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
|
-
|
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: "
|
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
|