RedHatSatellite / satellite-clone

Utility to assist cloning an existing Satellite 6 server to a new host
GNU General Public License v3.0
37 stars 31 forks source link

Fixed hammer-setup required for foreman-maintain #354

Closed ntkathole closed 5 years ago

ntkathole commented 5 years ago

Fixes #353

johnpmitsch commented 5 years ago

thanks for the PR, I'll test soon :)

johnpmitsch commented 5 years ago

yee-haw

johnpmitsch commented 5 years ago

will this just append to existing /etc/foreman-maintain/foreman-maintain-hammer.yml files? For example, if I have:

:foreman:
  :username: admin
  :password: kittens123

will the lineinfile match this? It seems like it won't and will just append new credentials to the file (this may work, but it is a bit messy if we append to the file and don't erase existing creds in it)

Since we always change the Satellite credentials to admin/changeme, I wonder if this would work better:

johnpmitsch commented 5 years ago

Also, another question - Were there changes in foreman-maintain to no longer need the credentials? I remember the fact that foreman-maintain needed credentials for a service restart was a concern when we initially discussed this issue.

johnpmitsch commented 5 years ago

@ntkathole I didn't see you updated this! I can review soon.

Do you know an answer to this question?

Also, another question - Were there changes in foreman-maintain to no longer need the credentials? I remember the fact that foreman-maintain needed credentials for a service restart was a concern when we initially discussed this issue.

ntkathole commented 5 years ago

@johnpmitsch the changes in f-m is in development. I see PR https://github.com/theforeman/foreman_maintain/pull/261 open to fix it.

johnpmitsch commented 5 years ago
PLAY RECAP *********************************************************************
192.168.121.25             : ok=21   changed=16   unreachable=0    failed=0   
192.168.121.37             : ok=21   changed=16   unreachable=0    failed=0   
192.168.121.75             : ok=21   changed=16   unreachable=0    failed=0   
192.168.121.76             : ok=21   changed=16   unreachable=0    failed=0 

passed automation, thanks @ntkathole!