Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use theforeman upstream cloud_connector role #901

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/services/foreman_rh_cloud/cloud_connector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ def install
composer = nil

input = {
:satellite_cloud_connector_user => service_user.login,
:satellite_cloud_connector_password => token_value,
:cloud_connector_user => service_user.login,
:cloud_connector_password => token_value,
}

if (http_proxy = ForemanRhCloud.proxy_setting(logger: Foreman::Logging.logger('app')))
input[:satellite_cloud_connector_http_proxy] = http_proxy
input[:cloud_connector_http_proxy] = http_proxy
end

Taxonomy.as_taxonomy(target_host.organization, target_host.location) do
Expand Down
13 changes: 8 additions & 5 deletions app/views/job_templates/cloud_connector.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
name: Configure Cloud Connector
snippet: false
template_inputs:
- name: satellite_cloud_connector_user
- name: cloud_connector_user
required: true
input_type: user
advanced: false
value_type: plain
hidden_value: false
- name: satellite_cloud_connector_password
- name: cloud_connector_password
required: true
input_type: user
advanced: false
value_type: plain
hidden_value: true
- name: satellite_cloud_connector_http_proxy
- name: cloud_connector_http_proxy
required: false
input_type: user
advanced: true
Expand All @@ -32,6 +32,9 @@ feature: ansible_configure_cloud_connector
- hosts: all
become: true
vars:
satellite_cloud_connector_url: "<%= foreman_server_url %>"
foreman_cloud_connector_url: "<%= foreman_server_url %>"
foreman_cloud_connector_user: "<%= cloud_connector_user %>"
foreman_cloud_connector_password: "<%= cloud_connector_password %>"
foreman_cloud_connector_http_proxy: "<%= cloud_connector_http_proxy %>"
roles:
- redhat.satellite_operations.cloud_connector
- theforeman.operations.cloud_connector
Copy link
Member

Choose a reason for hiding this comment

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

This alone won't work either -- all of the variables in this template are expecting the redhat.satellite_operations variables. I think the path forward is to create two templates and not try to play a game of branding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understand. Thanks for your feedback.
I have not test system right now for this change but, what do you think about changing the vars in that way, that they don't have foreman/satellite in their name. The template can then set foreman_cloud_connector_* or satellite_cloud_connector_* accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

I think we can start with renaming the vars to something that is project-neutral, but Eric's idea of replacing the template looks like a way forward if we want to properly brand this.

@adamruzicka , do we have a how-to guide for branding for_feature calls?

Copy link
Contributor

Choose a reason for hiding this comment

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

What would you like to brand there?

Loading