Class: Proxy::AnsibleDirector::Runners::PodmanPullRunner
- Inherits:
-
Dynflow::Runner::Base
- Object
- Dynflow::Runner::Base
- Proxy::AnsibleDirector::Runners::PodmanPullRunner
- Includes:
- Dynflow::Runner::ProcessManagerCommand
- Defined in:
- lib/smart_proxy_ansible_director/runners/podman_pull_runner.rb
Instance Method Summary collapse
-
#initialize(podman_pull_input, suspended_action: nil) ⇒ PodmanPullRunner
constructor
A new instance of PodmanPullRunner.
- #publish_data(message, type = 'debug') ⇒ Object
- #refresh ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(podman_pull_input, suspended_action: nil) ⇒ PodmanPullRunner
Returns a new instance of PodmanPullRunner.
12 13 14 15 |
# File 'lib/smart_proxy_ansible_director/runners/podman_pull_runner.rb', line 12 def initialize(podman_pull_input, suspended_action: nil) super suspended_action: suspended_action @ee_registry_url = podman_pull_input[:ee_registry_url] end |
Instance Method Details
#publish_data(message, type = 'debug') ⇒ Object
30 31 32 |
# File 'lib/smart_proxy_ansible_director/runners/podman_pull_runner.rb', line 30 def publish_data(, type = 'debug') @continuous_output.add_output(.force_encoding('UTF-8'), type) end |
#refresh ⇒ Object
24 25 26 27 28 |
# File 'lib/smart_proxy_ansible_director/runners/podman_pull_runner.rb', line 24 def refresh @process_manager.process(timeout: 0.1) unless @process_manager.done? puts @continuous_output.humanize publish_exit_status(@process_manager.status) if @process_manager.done? end |
#start ⇒ Object
17 18 19 20 21 22 |
# File 'lib/smart_proxy_ansible_director/runners/podman_pull_runner.rb', line 17 def start cmd = <<~CMD podman pull --tls-verify=false #{@ee_registry_url} CMD initialize_command('bash', '-c', cmd) end |