Skip to content

Commit

Permalink
Merged upstream master into issue-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorben-D committed Dec 8, 2023
2 parents cf9910a + e82bbcc commit e54414f
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
trigger: pull_request
targets:
centos-stream-8:
additional_modules: "foreman:el8,nodejs:12"
additional_modules: "foreman-devel:el8"
additional_repos:
- http://koji.katello.org/releases/yum/foreman-nightly/el8/x86_64/
- http://yum.theforeman.org/plugins/nightly/el8/x86_64/
Expand Down
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ file_filter = locale/<lang>/foreman_ansible.edit.po
source_file = locale/foreman_ansible.pot
source_lang = en
type = PO
minimum_perc = 0
minimum_perc = 50
resource_name = foreman_ansible
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AnsibleOverrideValuesController < ::Api::V2::BaseController
param_group :ansible_override_value, :as => :create

def create
@ansible_variable = AnsibleVariable.authorized(:edit_external_variables).
@ansible_variable = AnsibleVariable.authorized(:edit_ansible_variables).
find_by(:id => params[:ansible_variable_id].to_i)
@override_value = @ansible_variable.lookup_values.create!(lookup_value_params['override_value'])
@ansible_variable.update_attribute(:override, true)
Expand Down
2 changes: 1 addition & 1 deletion app/models/ansible_variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def self.humanize_class_name(options = nil)
end

def editable_by_user?
AnsibleVariable.authorized(:edit_external_parameters).
AnsibleVariable.authorized(:edit_ansible_variables).
where(:id => id).exists?
end
end
2 changes: 1 addition & 1 deletion app/views/ansible_variables/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
icon_text((variable.override ? "flag": ""), variable.key.to_s, :kind => 'fa', :title => _('Overriden')),
hash_for_edit_ansible_variable_path(:id => variable).
merge(:auth_object => variable,
:permission => 'edit_external_parameters',
:permission => 'edit_ansible_variables',
:authorizer => authorizer)
) %></td>
<td class="ellipsis"><%= link_to_if_authorized(
Expand Down
4 changes: 2 additions & 2 deletions foreman_ansible.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|

s.add_dependency 'acts_as_list', '~> 1.0.3'
s.add_dependency 'deface', '< 2.0'
s.add_dependency 'foreman_remote_execution', '>= 9.0', '< 12'
s.add_dependency 'foreman-tasks', '>= 7.0', '< 9'
s.add_dependency 'foreman_remote_execution', '>= 9.0', '< 13'
s.add_dependency 'foreman-tasks', '>= 7.0', '< 10'
s.add_dependency 'git', '~> 1.0'
end
5 changes: 3 additions & 2 deletions lib/foreman_ansible/register.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

Foreman::Plugin.register :foreman_ansible do
requires_foreman '>= 3.7'
requires_foreman '>= 3.8.1'
register_gettext

settings do
Expand Down Expand Up @@ -167,7 +167,8 @@
:create_job_invocations, :view_job_templates, # to allow the play_roles
:create_template_invocations, :view_smart_proxies, # ...
:view_ansible_roles, :destroy_ansible_roles,
:import_ansible_roles, :view_ansible_variables,
:import_ansible_roles, :view_ansible_variables, :view_lookup_values,
:create_lookup_values, :edit_lookup_values, :destroy_lookup_values,
:create_ansible_variables, :import_ansible_variables,
:edit_ansible_variables, :destroy_ansible_variables, :import_ansible_playbooks]

Expand Down
2 changes: 1 addition & 1 deletion lib/foreman_ansible/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# This way other parts of Foreman can just call ForemanAnsible::VERSION
# and detect what version the plugin is running.
module ForemanAnsible
VERSION = '12.0.7'
VERSION = '13.0.2'
end
6 changes: 3 additions & 3 deletions locale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# make tx-update - download and merge translations from Transifex
# make clean - clean everything
#
DOMAIN = foreman_ansible
VERSION = $(shell ruby -e 'require "rubygems";spec = Gem::Specification::load(Dir.glob("../*.gemspec")[0]);puts spec.version')
DOMAIN = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).name')
VERSION = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).version')
POTFILE = $(DOMAIN).pot
MOFILE = $(DOMAIN).mo
POFILES = $(shell find . -name '$(DOMAIN).po')
Expand Down Expand Up @@ -43,7 +43,7 @@ uniq-po:
done

tx-pull: $(EDITFILES)
cd .. && tx pull -f
cd .. && tx pull -f --all
for f in $(EDITFILES) ; do \
sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
done
Expand Down
30 changes: 15 additions & 15 deletions locale/foreman_ansible.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: foreman_ansible 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-18 09:26+0200\n"
"PO-Revision-Date: 2023-09-18 09:26+0200\n"
"POT-Creation-Date: 2023-11-28 18:16+0100\n"
"PO-Revision-Date: 2023-11-28 18:16+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
Expand Down Expand Up @@ -529,7 +529,7 @@ msgstr ""

#: ../app/views/ansible_roles/index.html.erb:12
#: ../app/views/ansible_roles/index.html.erb:29
#: ../lib/foreman_ansible/register.rb:220
#: ../lib/foreman_ansible/register.rb:221
#: ../webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js:18
#: ../webpack/components/AnsibleHostDetail/components/RolesTab/RolesTable.js:30
#: ../webpack/components/AnsibleHostDetail/constants.js:6
Expand Down Expand Up @@ -725,9 +725,9 @@ msgid "Enable Ansible Callback"
msgstr ""

#: ../app/views/job_templates/_job_template_callback_tab_headers.html.erb:1
#: ../lib/foreman_ansible/register.rb:8 ../lib/foreman_ansible/register.rb:214
#: ../lib/foreman_ansible/register.rb:264
#: ../lib/foreman_ansible/register.rb:270
#: ../lib/foreman_ansible/register.rb:8 ../lib/foreman_ansible/register.rb:215
#: ../lib/foreman_ansible/register.rb:265
#: ../lib/foreman_ansible/register.rb:271
msgid "Ansible"
msgstr ""

Expand All @@ -743,7 +743,7 @@ msgstr ""
#: ../db/seeds.d/90_notification_blueprints.rb:18
#: ../db/seeds.d/90_notification_blueprints.rb:25
#: ../db/seeds.d/90_notification_blueprints.rb:30
#: ../lib/foreman_ansible/register.rb:216
#: ../lib/foreman_ansible/register.rb:217
#: ../webpack/components/AnsibleHostDetail/constants.js:5
msgid "Roles"
msgstr ""
Expand Down Expand Up @@ -881,8 +881,8 @@ msgstr ""
msgid "Proxy tasks batch size for Ansible"
msgstr ""

#: ../lib/foreman_ansible/register.rb:252
#: ../lib/foreman_ansible/register.rb:258
#: ../lib/foreman_ansible/register.rb:253
#: ../lib/foreman_ansible/register.rb:259
msgid "Update Smart Proxy"
msgstr ""

Expand Down Expand Up @@ -965,32 +965,32 @@ msgid "Are you sure you want to delete override for %s?"
msgstr ""

#:
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:13
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:18
msgid "Default value"
msgstr ""

#:
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:49
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:54
msgid "Ansible variable override was successfully deleted."
msgstr ""

#:
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:63
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:68
msgid "There was a following error when deleting Ansible variable override: %s"
msgstr ""

#:
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:82
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:87
msgid "Invalid, expected to match a regex: %s"
msgstr ""

#:
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:98
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:103
msgid "Invalid, expected one of: %s"
msgstr ""

#:
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:104
#: ../webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js:109
msgid "is required"
msgstr ""

Expand Down

0 comments on commit e54414f

Please sign in to comment.