foreman_ansible 6.2.0 → 6.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/ansible_roles_controller.rb +12 -8
  3. data/app/controllers/ansible_variables_controller.rb +4 -0
  4. data/app/controllers/api/v2/ansible_roles_controller.rb +32 -11
  5. data/app/controllers/api/v2/ansible_variables_controller.rb +6 -4
  6. data/app/controllers/foreman_ansible/concerns/import_controller_helper.rb +3 -3
  7. data/app/helpers/foreman_ansible/ansible_reports_helper.rb +8 -0
  8. data/app/helpers/foreman_ansible/ansible_roles_data_preparations.rb +95 -0
  9. data/app/helpers/foreman_ansible/ansible_roles_helper.rb +20 -1
  10. data/app/jobs/sync_roles_and_variables.rb +20 -0
  11. data/app/models/concerns/foreman_ansible/host_managed_extensions.rb +7 -4
  12. data/app/models/concerns/foreman_ansible/hostgroup_extensions.rb +7 -4
  13. data/app/models/foreman_ansible/ansible_provider.rb +2 -1
  14. data/app/models/host_ansible_role.rb +1 -0
  15. data/app/models/hostgroup_ansible_role.rb +1 -0
  16. data/app/models/setting/ansible.rb +9 -0
  17. data/app/services/foreman_ansible/ansible_report_importer.rb +4 -0
  18. data/app/services/foreman_ansible/ansible_report_scanner.rb +15 -1
  19. data/app/services/foreman_ansible/api_roles_importer.rb +23 -11
  20. data/app/services/foreman_ansible/fact_parser.rb +21 -1
  21. data/app/services/foreman_ansible/import_roles_and_variables_error_notification.rb +31 -0
  22. data/app/services/foreman_ansible/import_roles_and_variables_success_notification.rb +26 -0
  23. data/app/services/foreman_ansible/inventory_creator.rb +3 -7
  24. data/app/services/foreman_ansible/roles_importer.rb +3 -2
  25. data/app/services/foreman_ansible/ui_roles_importer.rb +2 -2
  26. data/app/services/foreman_ansible/variables_importer.rb +32 -2
  27. data/app/views/ansible_roles/import.html.erb +10 -50
  28. data/app/views/ansible_variables/index.html.erb +1 -2
  29. data/app/views/api/v2/ansible_roles/sync.json.rabl +5 -0
  30. data/app/views/foreman_ansible/ansible_roles/_select_tab_content.html.erb +1 -2
  31. data/app/views/foreman_ansible/config_reports/_ansible.html.erb +13 -6
  32. data/app/views/foreman_ansible/job_templates/ansible_collections_-_install_from_galaxy.erb +28 -0
  33. data/app/views/foreman_ansible/job_templates/convert_to_rhel.erb +44 -0
  34. data/config/routes.rb +5 -4
  35. data/db/migrate/20210120150019_add_position_to_ansible_role.rb +27 -0
  36. data/db/seeds.d/100_common_parameters.rb +7 -0
  37. data/db/seeds.d/90_notification_blueprints.rb +19 -1
  38. data/lib/foreman_ansible/engine.rb +1 -0
  39. data/lib/foreman_ansible/register.rb +5 -5
  40. data/lib/foreman_ansible/version.rb +1 -1
  41. data/locale/ca/LC_MESSAGES/foreman_ansible.mo +0 -0
  42. data/locale/ca/foreman_ansible.po +1 -1
  43. data/locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo +0 -0
  44. data/locale/cs_CZ/foreman_ansible.po +1 -1
  45. data/locale/de/LC_MESSAGES/foreman_ansible.mo +0 -0
  46. data/locale/de/foreman_ansible.po +1 -1
  47. data/locale/en/LC_MESSAGES/foreman_ansible.mo +0 -0
  48. data/locale/en/foreman_ansible.po +1 -1
  49. data/locale/en_GB/LC_MESSAGES/foreman_ansible.mo +0 -0
  50. data/locale/en_GB/foreman_ansible.po +1 -1
  51. data/locale/es/LC_MESSAGES/foreman_ansible.mo +0 -0
  52. data/locale/es/foreman_ansible.po +1 -1
  53. data/locale/fr/LC_MESSAGES/foreman_ansible.mo +0 -0
  54. data/locale/fr/foreman_ansible.po +1 -1
  55. data/locale/gl/LC_MESSAGES/foreman_ansible.mo +0 -0
  56. data/locale/gl/foreman_ansible.po +1 -1
  57. data/locale/it/LC_MESSAGES/foreman_ansible.mo +0 -0
  58. data/locale/it/foreman_ansible.po +1 -1
  59. data/locale/ja/LC_MESSAGES/foreman_ansible.mo +0 -0
  60. data/locale/ja/foreman_ansible.po +1 -1
  61. data/locale/ko/LC_MESSAGES/foreman_ansible.mo +0 -0
  62. data/locale/ko/foreman_ansible.po +1 -1
  63. data/locale/nl_NL/LC_MESSAGES/foreman_ansible.mo +0 -0
  64. data/locale/nl_NL/foreman_ansible.po +1 -1
  65. data/locale/pl/LC_MESSAGES/foreman_ansible.mo +0 -0
  66. data/locale/pl/foreman_ansible.po +1 -1
  67. data/locale/pt_BR/LC_MESSAGES/foreman_ansible.mo +0 -0
  68. data/locale/pt_BR/foreman_ansible.po +1 -1
  69. data/locale/ru/LC_MESSAGES/foreman_ansible.mo +0 -0
  70. data/locale/ru/foreman_ansible.po +1 -1
  71. data/locale/sv_SE/LC_MESSAGES/foreman_ansible.mo +0 -0
  72. data/locale/sv_SE/foreman_ansible.po +1 -1
  73. data/locale/zh_CN/LC_MESSAGES/foreman_ansible.mo +0 -0
  74. data/locale/zh_CN/foreman_ansible.po +1 -1
  75. data/locale/zh_TW/LC_MESSAGES/foreman_ansible.mo +0 -0
  76. data/locale/zh_TW/foreman_ansible.po +1 -1
  77. data/test/factories/ansible_roles.rb +12 -0
  78. data/test/factories/host_ansible_enhancements.rb +23 -0
  79. data/test/foreman_ansible/helpers/ansible_roles_helper_test.rb +45 -0
  80. data/test/functional/ansible_variables_controller_test.rb +0 -15
  81. data/test/functional/api/v2/ansible_roles_controller_test.rb +23 -0
  82. data/test/functional/api/v2/hostgroups_controller_test.rb +5 -4
  83. data/test/functional/api/v2/hosts_controller_test.rb +9 -8
  84. data/test/functional/hosts_controller_test.rb +10 -6
  85. data/test/unit/concerns/host_managed_extensions_test.rb +17 -3
  86. data/test/unit/concerns/hostgroup_extensions_test.rb +13 -7
  87. data/test/unit/host_ansible_role_test.rb +2 -1
  88. data/test/unit/hostgroup_ansible_role_test.rb +2 -1
  89. data/test/unit/ignore_roles_test.rb +43 -0
  90. data/test/unit/import_roles_and_variables.rb +60 -0
  91. data/test/unit/services/api_roles_importer_test.rb +22 -5
  92. data/test/unit/services/fact_parser_test.rb +16 -0
  93. data/test/unit/services/inventory_creator_test.rb +15 -7
  94. data/test/unit/services/ui_roles_importer_test.rb +2 -2
  95. data/webpack/__mocks__/foremanReact/common/helpers.js +13 -0
  96. data/webpack/__mocks__/foremanReact/components/common/forms/OrderableSelect/helpers.js +5 -0
  97. data/webpack/__mocks__/foremanReact/redux/API.js +7 -0
  98. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariables.js +178 -0
  99. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariables.scss +9 -0
  100. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesActions.js +39 -0
  101. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesConstants.js +4 -0
  102. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesHelpers.js +11 -0
  103. data/webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js +50 -0
  104. data/webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesImport.test.js +39 -0
  105. data/webpack/components/AnsibleRolesAndVariables/__test__/__snapshots__/AnsibleRolesAndVariablesImport.test.js.snap +177 -0
  106. data/webpack/components/AnsibleRolesAndVariables/index.js +31 -0
  107. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcher.js +14 -18
  108. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcher.scss +1 -1
  109. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcherActions.js +6 -0
  110. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcherConstants.js +1 -2
  111. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcherReducer.js +13 -8
  112. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcherSelectors.js +8 -28
  113. data/webpack/components/AnsibleRolesSwitcher/__fixtures__/ansibleRolesSwitcherReducer.fixtures.js +1 -0
  114. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcher.test.js +2 -0
  115. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcherReducer.test.js +0 -8
  116. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcherSelectors.test.js +2 -15
  117. data/webpack/components/AnsibleRolesSwitcher/__tests__/__snapshots__/AnsibleRolesSwitcher.test.js.snap +4 -9
  118. data/webpack/components/AnsibleRolesSwitcher/__tests__/__snapshots__/AnsibleRolesSwitcherReducer.test.js.snap +8 -97
  119. data/webpack/components/AnsibleRolesSwitcher/__tests__/__snapshots__/AnsibleRolesSwitcherSelectors.test.js.snap +5 -30
  120. data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRole.js +5 -2
  121. data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRoleInputs.js +43 -0
  122. data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRoleInputs.test.js +19 -0
  123. data/webpack/components/AnsibleRolesSwitcher/components/AssignedRolesList.js +63 -51
  124. data/webpack/components/AnsibleRolesSwitcher/components/AssignedRolesList.test.js +3 -0
  125. data/webpack/components/AnsibleRolesSwitcher/components/OrderedRolesTooltip.js +23 -0
  126. data/webpack/components/AnsibleRolesSwitcher/components/__snapshots__/AnsibleRoleInputs.test.js.snap +51 -0
  127. data/webpack/components/AnsibleRolesSwitcher/components/__snapshots__/AssignedRolesList.test.js.snap +28 -28
  128. data/webpack/components/AnsibleRolesSwitcher/index.js +3 -7
  129. data/webpack/index.js +6 -0
  130. metadata +55 -9
  131. data/app/views/ansible_variables/import.html.erb +0 -56
@@ -0,0 +1,28 @@
1
+ <%#
2
+ name: Ansible Collection - Install from Galaxy
3
+ job_category: Ansible Galaxy
4
+ description_format: Install collections '%{ansible_collections_list}' from Galaxy
5
+ snippet: false
6
+ template_inputs:
7
+ - name: ansible_collections_list
8
+ required: true
9
+ input_type: user
10
+ description: "List of collections in Ansible Galaxy to install, separated by commas, e.g:
11
+ mysql,nginx\r\n\r\nThe default collections_paths is configured in /etc/ansible/ansible.cfg,
12
+ you may override it by filling the 'collections_path' input.
13
+ Click on \"Advanced\" to see it."
14
+ advanced: false
15
+ - name: collections_path
16
+ required: false
17
+ input_type: user
18
+ description: A particular directory where you want the downloaded collections to be placed.
19
+ advanced: true
20
+ provider_type: Ansible
21
+ kind: job_template
22
+ model: JobTemplate
23
+ %>
24
+
25
+ ---
26
+ - hosts: all
27
+ tasks:
28
+ - command: ansible-galaxy collection install <%= input('ansible_collections_list').split(",").join(' ') %> -p <%= input('collections_path').present? ? input('collections_path') : '/etc/ansible/collections' %>
@@ -0,0 +1,44 @@
1
+ <%#
2
+ name: Convert to RHEL
3
+ snippet: false
4
+ template_inputs:
5
+ - name: Activation Key
6
+ required: true
7
+ input_type: user
8
+ advanced: false
9
+ value_type: plain
10
+ resource_type: Katello::ActivationKey
11
+ hidden_value: false
12
+ - name: Restart
13
+ required: true
14
+ input_type: user
15
+ options: "yes\r\nno"
16
+ advanced: false
17
+ value_type: plain
18
+ resource_type: Katello::ActivationKey
19
+ hidden_value: false
20
+ model: JobTemplate
21
+ job_category: Convert 2 RHEL
22
+ provider_type: Ansible
23
+ kind: job_template
24
+ %>
25
+ ---
26
+ - hosts: all
27
+ tasks:
28
+ - name: Install convert2rhel
29
+ ansible.builtin.package:
30
+ name: convert2rhel
31
+ state: present
32
+ - name: Prepopulate katello-ca-consumer
33
+ get_url:
34
+ url: <%= subscription_manager_configuration_url(@host) %>
35
+ dest: /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm
36
+ - name: Start convert2rhel
37
+ command: convert2rhel -y --activationkey "<%= input('Activation Key') %>" --org "<%= @host.organization.label %>" > /root/convert2rhel.log
38
+ <%- if input('Restart') == "yes" -%>
39
+ - name: Reboot the machine
40
+ reboot:
41
+ reboot_timeout: 1800
42
+ <%- end -%>
43
+ - name: Update system facts
44
+ command: subscription-manager facts --update
data/config/routes.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Rails.application.routes.draw do
4
- namespace :api do
4
+ namespace :api, defaults: { format: 'json' } do
5
5
  scope '(:apiv)',
6
6
  :module => :v2,
7
- :defaults => { :apiv => 'v2' },
8
- :apiv => /v1|v2/,
9
- :constraints => ApiConstraints.new(:version => 2) do
7
+ :defaults => { apiv: 'v2' },
8
+ :apiv => /v2/,
9
+ :constraints => ApiConstraints.new(version: 2, default: true) do
10
10
  constraints(:id => %r{[^\/]+}) do
11
11
  resources :hosts, :only => [] do
12
12
  member do
@@ -76,6 +76,7 @@ Rails.application.routes.draw do
76
76
  resources :ansible_roles, :only => [:show, :index, :destroy] do
77
77
  collection do
78
78
  put :import
79
+ put :sync
79
80
  put :obsolete
80
81
  get :fetch
81
82
  end
@@ -0,0 +1,27 @@
1
+ class AddPositionToAnsibleRole < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :host_ansible_roles, :position, :integer
4
+ add_column :hostgroup_ansible_roles, :position, :integer
5
+
6
+ update_hostgroup_ansible_roles
7
+ update_host_ansible_roles
8
+ change_column_null :host_ansible_roles, :position, false
9
+ change_column_null :hostgroup_ansible_roles, :position, false
10
+ end
11
+
12
+ def update_host_ansible_roles
13
+ HostAnsibleRole.all.pluck(:host_id, :id).group_by(&:first).each do |_host_id, role_ids|
14
+ role_ids.each_with_index do |(_host_id, host_role_id), idx|
15
+ HostAnsibleRole.find(host_role_id).update(position: idx + 1)
16
+ end
17
+ end
18
+ end
19
+
20
+ def update_hostgroup_ansible_roles
21
+ HostgroupAnsibleRole.all.pluck(:hostgroup_id, :id).group_by(&:first).each do |_hostgroup_id, role_ids|
22
+ role_ids.each_with_index do |(_hostgroup_id, hostgroup_role_id), idx|
23
+ HostgroupAnsibleRole.find(hostgroup_role_id).update(position: idx + 1)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,7 @@
1
+ CommonParameter.without_auditing do
2
+ params = [
3
+ { name: 'ansible_roles_check_mode', key_type: 'boolean', value: false }
4
+ ]
5
+
6
+ params.each { |param| CommonParameter.find_or_create_by(param) }
7
+ end
@@ -13,7 +13,25 @@ blueprints = [
13
13
  :title => N_('Job Details')
14
14
  ]
15
15
  }
16
+ },
17
+ {
18
+ :group => N_('Roles'),
19
+ :name => 'Sync_roles_and_variables_successfully',
20
+ :message => N_('Import roles and variables has finished successfully'),
21
+ :level => 'success',
22
+ :actions => {
23
+ :links => [
24
+ :path_method => :ansible_roles_path,
25
+ :title => N_('Roles')
26
+ ]
27
+ }
28
+ },
29
+ {
30
+ :group => N_('Roles'),
31
+ :name => 'Sync_roles_and_variables_failed',
32
+ :message => 'DYNAMIC',
33
+ :level => 'error'
16
34
  }
17
- ]
18
35
 
36
+ ]
19
37
  blueprints.each { |blueprint| UINotifications::Seed.new(blueprint).configure }
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'deface'
4
+ require 'acts_as_list'
4
5
  require 'fast_gettext'
5
6
  require 'gettext_i18n_rails'
6
7
  require 'foreman_ansible_core' if Rails.env.test?
@@ -25,7 +25,7 @@ Foreman::Plugin.register :foreman_ansible do
25
25
  :resource_type => 'AnsibleRole'
26
26
  permission :import_ansible_roles,
27
27
  { :ansible_roles => [:import, :confirm_import],
28
- :'api/v2/ansible_roles' => [:import] },
28
+ :'api/v2/ansible_roles' => [:import, :sync] },
29
29
  :resource_type => 'AnsibleRole'
30
30
  permission :view_ansible_variables,
31
31
  {
@@ -91,10 +91,10 @@ Foreman::Plugin.register :foreman_ansible do
91
91
  extend_template_helpers ForemanAnsible::RendererMethods
92
92
  allowed_template_helpers :insights_remediation
93
93
 
94
- role_assignment_params = { :ansible_role_ids => [],
95
- :ansible_roles => [] }
96
- parameter_filter Host::Managed, role_assignment_params
97
- parameter_filter Hostgroup, role_assignment_params
94
+ base_role_assignment_params = { :ansible_role_ids => [],
95
+ :ansible_roles => [] }
96
+ parameter_filter Host::Managed, base_role_assignment_params.merge(:host_ansible_roles_attributes => {})
97
+ parameter_filter Hostgroup, base_role_assignment_params.merge(:hostgroup_ansible_roles_attributes => {})
98
98
 
99
99
  divider :top_menu, :caption => N_('Ansible'), :parent => :configure_menu
100
100
  menu :top_menu, :ansible_roles,
@@ -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 = '6.2.0'
7
+ VERSION = '6.3.0'
8
8
  end
@@ -8,7 +8,7 @@
8
8
  #
9
9
  msgid ""
10
10
  msgstr ""
11
- "Project-Id-Version: foreman_ansible 5.0.1\n"
11
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
12
12
  "Report-Msgid-Bugs-To: \n"
13
13
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
14
14
  "Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2019\n"
@@ -9,7 +9,7 @@
9
9
  #
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: foreman_ansible 5.0.1\n"
12
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
15
15
  "Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>, 2020\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -4,7 +4,7 @@
4
4
  #
5
5
  msgid ""
6
6
  msgstr ""
7
- "Project-Id-Version: foreman_ansible 5.0.1\n"
7
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
8
8
  "Report-Msgid-Bugs-To: \n"
9
9
  "PO-Revision-Date: 2014-08-20 08:54+0100\n"
10
10
  "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
@@ -9,7 +9,7 @@
9
9
  #
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: foreman_ansible 5.0.1\n"
12
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
15
15
  "Last-Translator: Andi Chandler <andi@gowling.com>, 2019\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -8,7 +8,7 @@
8
8
  #
9
9
  msgid ""
10
10
  msgstr ""
11
- "Project-Id-Version: foreman_ansible 5.0.1\n"
11
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
12
12
  "Report-Msgid-Bugs-To: \n"
13
13
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
14
14
  "Last-Translator: Carmela Rubiños <carmela.rubinos@gmail.com>, 2019\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -13,7 +13,7 @@
13
13
  #
14
14
  msgid ""
15
15
  msgstr ""
16
- "Project-Id-Version: foreman_ansible 5.0.1\n"
16
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
17
17
  "Report-Msgid-Bugs-To: \n"
18
18
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
19
19
  "Last-Translator: dschutterop <daniel@schutterop.nl>, 2019\n"
@@ -9,7 +9,7 @@
9
9
  #
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: foreman_ansible 5.0.1\n"
12
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
15
15
  "Last-Translator: Michał Foryt <michal.foryt@gmail.com>, 2019\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -10,7 +10,7 @@
10
10
  #
11
11
  msgid ""
12
12
  msgstr ""
13
- "Project-Id-Version: foreman_ansible 5.0.1\n"
13
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
14
14
  "Report-Msgid-Bugs-To: \n"
15
15
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
16
16
  "Last-Translator: johnny.westerlund <johnny.westerlund@gmail.com>, 2019\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_ansible 5.0.1\n"
8
+ "Project-Id-Version: foreman_ansible 3.0.2\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2018-03-12 12:24-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -4,4 +4,16 @@ FactoryBot.define do
4
4
  factory :ansible_role do
5
5
  sequence(:name) { |n| "ansible_role_#{n}" }
6
6
  end
7
+
8
+ factory :host_ansible_role do
9
+ position { nil }
10
+ host
11
+ ansible_role
12
+ end
13
+
14
+ factory :hostgroup_ansible_role do
15
+ position { nil }
16
+ hostgroup
17
+ ansible_role
18
+ end
7
19
  end