theforeman / forklift

Helpful deployment scripts for Foreman and Katello
https://theforeman.github.io/forklift
GNU General Public License v3.0
183 stars 199 forks source link

Hammer sub-command environment fails on CentOS 7 Provision Nightly #1442

Open ephracis opened 2 years ago

ephracis commented 2 years ago

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>
ekohl commented 2 years ago

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

ofedoren commented 2 years ago

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.