Sha256: 5500219c2d4f572f0d8ff4454a02ffcd0dbe2fd76a6ac728774a2c8e7292e024

Contents?: true

Size: 1.24 KB

Versions: 32

Compression:

Stored size: 1.24 KB

Contents

module ForemanOpenscap
  module ClientConfig
    class Ansible < Base
      delegate :ansible_role_name, :to => :constants

      alias config_item_name ansible_role_name

      def type
        :ansible
      end

      def available?
        defined?(ForemanAnsible)
      end

      def inline_help
        {
          :text => "Requires Ansible plugin, #{ansible_role_name} Ansible role and variables. This will assign the role to the hosts or selected hostgroups.<br>To deploy foreman_scap_client, ansible roles run needs to be triggered manually. Manual run is also required after any change to this policy.",
          :replace_text => 'Ansible role',
          :route_helper_method => :hash_for_ansible_roles_path
        }
      end

      def constants
        OpenStruct.new(
          :server_param => 'foreman_scap_client_server',
          :port_param => 'foreman_scap_client_port',
          :policies_param => 'foreman_scap_client_policies',
          :ansible_role_name => 'theforeman.foreman_scap_client',
          :config_item_class_name => 'AnsibleRole',
          :override_method_name => 'ansible_variables',
          :msg_name => _('Ansible role'),
          :lookup_key_plural_name => _('Ansible variables')
        )
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
foreman_openscap-4.1.3 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.6 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.2.0 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.5 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.1.2 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.1.1 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.1.0 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.4 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.3 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.2 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.1 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-3.0.1 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-4.0.0 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-3.0.0 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-2.0.2 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-1.0.10 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-2.0.1 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-1.0.9 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-2.0.0 app/services/foreman_openscap/client_config/ansible.rb
foreman_openscap-1.0.8 app/services/foreman_openscap/client_config/ansible.rb