Skip to content

Deploy hammer and smart proxy for development#373

Open
adamruzicka wants to merge 10 commits intotheforeman:masterfrom
adamruzicka:hammer-proxy-dev
Open

Deploy hammer and smart proxy for development#373
adamruzicka wants to merge 10 commits intotheforeman:masterfrom
adamruzicka:hammer-proxy-dev

Conversation

@adamruzicka
Copy link
Contributor

No description provided.

Copy link
Contributor Author

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could possibly be made DRYer if needed. Left some comments as explanations

Comment on lines 51 to +59
foreman_remote_execution:
name: "theforeman/foreman_remote_execution"
manage_repo: true
hammer:
name: "theforeman/hammer_cli_foreman_remote_execution"
module_config: foreman_remote_execution.yml
smart_proxy:
name: "theforeman/smart_proxy_remote_execution_ssh"
module_config: remote_execution_ssh.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the name of simplicity, this PR makes the assumption that each foreman plugin may correspond to a single hammer plugin and a single foreman-proxy plugin.

This rules out:

  • standalone smart proxy plugins
  • standalone hammer plugins
  • odd cases where a single foreman plugin would have multiple hammer or smart proxy plugins at once

Comment on lines +65 to +66
gem: hammer_cli_foreman_ansible
name: "theforeman/hammer-cli-foreman-ansible"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gem needs to be provided only if it differs from the repository name

Comment on lines +254 to +262
- name: Configure smart-proxy for development
ansible.builtin.include_tasks: smart-proxy/main.yml
when:
- "'foreman-proxy' in enabled_features"

- name: Configure hammer for development
ansible.builtin.include_tasks: hammer/main.yml
when:
- "'hammer' in enabled_features"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having these as separate roles would be cleaner, but then I couldn't reuse the plugin registry this role carries in its defaults.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we split the plugin registry into a role that is mostly for meta purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can a role access variables from a different role?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sure it can, just a question of best practices....summoning @evgeni

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summoning costs a soul of a unicorn and three pints of your best ale.

"everything is a role" is an IMHO bad pattern. In #372 and #309 I propose to provide select data via a metadata mechanism, which I am sure we could extend with development data if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want to wait, sure, be my guest (I'll share the ale too!)

but ideally someone should have a look whether #372 is even easily usable for dev-environments

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd lean towards get something useful in and then refactor if it makes sense to on top of the final design. This is for development after all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, is there anything left to be done or can we get it in as-is?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least CI should be green ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is green now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just weird becoming a directory, isn't it?..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure I noticed the wrong dir for the command and then changed something completely else...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we install openscap-scanner on proxy/sat though? I thought it's for clients only..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc we do need that for format conversions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehelms
Copy link
Member

ehelms commented Feb 19, 2026

@adamruzicka
Copy link
Contributor Author

Updated the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments