Module: HammerCLIKatello::Repository::AnsibleCollectionRequirementsHelper

Included in:
CreateCommand, UpdateCommand
Defined in:
lib/hammer_cli_katello/repository.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/hammer_cli_katello/repository.rb', line 6

def self.included(base)
  base.option "--ansible-collection-requirements-file",
              "REQUIREMENTS_FILE", _("Location of the ansible collections "\
                                   "requirements.yml file. "),
              :attribute_name => :option_ansible_collection_requirements_file,
              :required => false
end

Instance Method Details

#request_paramsObject



14
15
16
17
18
19
20
21
# File 'lib/hammer_cli_katello/repository.rb', line 14

def request_params
  super.tap do |opts|
    requirements_file = option_ansible_collection_requirements_file
    if requirements_file
      opts["ansible_collection_requirements"] = File.read(requirements_file)
    end
  end
end