forklift icon indicating copy to clipboard operation
forklift copied to clipboard

Hammer sub-command environment fails on CentOS 7 Provision Nightly

Open ephracis opened this issue 2 years ago • 2 comments

I try to bring up the box centos7-provision-nightly but it fails with the following error:

TASK [foreman_provisioning_infrastructure : update environment] ****************
fatal: [centos7-provision-nightly]: FAILED! => changed=true 
  cmd: |-
    hammer environment update --name production --organizations 'Default Organization' --locations 'Default Location'
  delta: '0:00:01.089646'
  end: '2021-11-12 10:22:07.066657'
  msg: non-zero return code
  rc: 64
  start: '2021-11-12 10:22:05.977011'
  stderr: |-
    Error: No such sub-command 'environment'.
  
    See: 'hammer --help'.
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

ephracis avatar Nov 12 '21 10:11 ephracis

I think this command was renamed due to ambiguity. I think it should now be puppet-environment.

ekohl avatar Dec 23 '21 13:12 ekohl

Exactly, first of all the environment command was deprecated for a while and then was removed in hammer-cli-foreman 3.0.0. Moreover at that time all the Puppet related commands/options were extracted and are no longer present in hammer-cli-foreman starting 3.0.0 version. To have those, you need to install hammer-cli-foreman-puppet plugin.

P.S. There are no longer environment command anyway, it's puppet-environment now.

ofedoren avatar Dec 23 '21 15:12 ofedoren