From 99761908d95f891eaad180f3faf892fcc4e8c31a Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 25 Mar 2022 14:43:16 +0100 Subject: [PATCH 01/11] bump version to 1.1.0-dev again --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index e73f555..3675709 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ authors: - "Kyle Williams " - "Matthias Dellweg <2500@gmx.de>" - "willtome " -version: "1.0.2" +version: "1.1.0-dev" license: - "GPL-3.0-or-later" tags: From f64a2d6beae799fbd1ea992211964126eeb28f4f Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 29 Mar 2022 09:21:18 +0200 Subject: [PATCH 02/11] Add Ansible Core 2.13 to test matrix --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8813c91..4bd1375 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,7 @@ jobs: - stable-2.10 - stable-2.11 - stable-2.12 + - stable-2.13 - devel include: - python: "2.7" @@ -119,6 +120,7 @@ jobs: - stable-2.10 - stable-2.11 - stable-2.12 + - stable-2.13 - devel steps: - uses: actions/checkout@v3 From 4083294592799a1d9c2b94e73e15aa13aed35239 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 11 Apr 2022 10:03:45 +0200 Subject: [PATCH 03/11] don't set `warn: false` for `command: dnf` invocations the warn parameter is deprecated and removed in ansible-core 2.14 --- roles/foreman_repositories/tasks/redhat-modules.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/roles/foreman_repositories/tasks/redhat-modules.yml b/roles/foreman_repositories/tasks/redhat-modules.yml index e8703e8..f7c5cfc 100644 --- a/roles/foreman_repositories/tasks/redhat-modules.yml +++ b/roles/foreman_repositories/tasks/redhat-modules.yml @@ -5,7 +5,6 @@ # https://github.com/ansible/ansible/issues/56504 # https://github.com/ansible/ansible/issues/64852 args: - warn: false creates: /etc/dnf/modules.d/foreman.module tags: - packages @@ -18,7 +17,6 @@ # https://github.com/ansible/ansible/issues/56504 # https://github.com/ansible/ansible/issues/64852 args: - warn: false creates: /etc/dnf/modules.d/katello.module tags: - packages @@ -32,7 +30,6 @@ # https://github.com/ansible/ansible/issues/56504 # https://github.com/ansible/ansible/issues/64852 args: - warn: false creates: /etc/dnf/modules.d/pki-core.module tags: - packages From 725bbc28c6ecb5baacf2986740d4d15cb69ba331 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 08:52:32 +0000 Subject: [PATCH 04/11] Bump actions/upload-artifact from 2 to 3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4bd1375..5d6a2be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,7 +81,7 @@ jobs: - name: Build docs run: make doc - name: Upload docs artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs-html path: docs/_build/html/ @@ -106,7 +106,7 @@ jobs: - name: Run lint run: make lint - name: Upload collection artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: collection path: theforeman-operations-*.tar.gz From 3a5fbc20b7d164e2891162cc33a6ce12f0d56079 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Mon, 18 Apr 2022 16:42:21 -0400 Subject: [PATCH 05/11] Update Github workflows to latest --- .github/workflows/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d6a2be..7d57a9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: - name: Install libyaml-dev for PyYAML run: sudo apt-get install -y libyaml-dev - name: Install Ansible - run: pip install --upgrade git+https://github.com/ansible/ansible.git@${{ matrix.ansible }} + run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz - name: Install dependencies run: make test-setup - name: Install required collections for ansible-base (2.10+) @@ -102,7 +102,9 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - name: Install dependencies - run: pip install --upgrade -r requirements-lint.txt ansible + run: | + pip install --upgrade ansible-core + pip install --upgrade -r requirements-lint.txt - name: Run lint run: make lint - name: Upload collection artifact @@ -129,7 +131,7 @@ jobs: with: python-version: "3.8" - name: Install Ansible - run: pip install --upgrade git+https://github.com/ansible/ansible.git@${{ matrix.ansible }} + run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz - name: Install dependencies run: make test-setup - name: Run tests From 3f94792b9fd508fd2f423e71b41bc32a569904a0 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Thu, 23 Dec 2021 16:44:16 -0500 Subject: [PATCH 06/11] Add a role to install cloud-connector --- roles/cloud_connector/README.md | 29 +++++++++ roles/cloud_connector/defaults/main.yml | 4 ++ .../tasks/cleanup_receptor.yml | 52 ++++++++++++++++ .../cloud_connector/tasks/delete_source.yaml | 20 ++++++ roles/cloud_connector/tasks/main.yml | 62 +++++++++++++++++++ .../templates/foreman_rh_cloud.toml.j2 | 8 +++ 6 files changed, 175 insertions(+) create mode 100644 roles/cloud_connector/README.md create mode 100644 roles/cloud_connector/defaults/main.yml create mode 100644 roles/cloud_connector/tasks/cleanup_receptor.yml create mode 100644 roles/cloud_connector/tasks/delete_source.yaml create mode 100644 roles/cloud_connector/tasks/main.yml create mode 100644 roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 diff --git a/roles/cloud_connector/README.md b/roles/cloud_connector/README.md new file mode 100644 index 0000000..0a154ba --- /dev/null +++ b/roles/cloud_connector/README.md @@ -0,0 +1,29 @@ +theforeman.operations.cloud_connector +===================================== + +Install and configure Red Hat Cloud Connector + +Role Variables +-------------- + +Required: + +- `foreman_cloud_connector_url`: The URL of the Foreman server. +- `foreman_cloud_connector_user`: The username cloud connector will use to talk to Foreman API. +- `foreman_cloud_connector_password`: The password cloud connector will use to talk to Foreman API. + +Example Playbooks +----------------- + +Run the installer setting the initial admin password: +Configure Cloud Connector: + +```yaml +- hosts: target-host + roles: + - role: theforeman.operations.cloud_connector + vars: + foreman_cloud_connector_url: https://foreman.example.com + foreman_cloud_connector_user: admin + foreman_cloud_connector_password: changeme +``` diff --git a/roles/cloud_connector/defaults/main.yml b/roles/cloud_connector/defaults/main.yml new file mode 100644 index 0000000..132dacd --- /dev/null +++ b/roles/cloud_connector/defaults/main.yml @@ -0,0 +1,4 @@ +--- +foreman_cloud_connector_console_redhat_host: cert.cloud.redhat.com +foreman_cloud_connector_config_file: /etc/rhc/workers/foreman_rh_cloud.toml +foreman_cloud_connector_validate_certs: true diff --git a/roles/cloud_connector/tasks/cleanup_receptor.yml b/roles/cloud_connector/tasks/cleanup_receptor.yml new file mode 100644 index 0000000..c536084 --- /dev/null +++ b/roles/cloud_connector/tasks/cleanup_receptor.yml @@ -0,0 +1,52 @@ +--- +- name: Identify Satellite ID from Satellite + ansible.builtin.uri: + url: "{{ foreman_cloud_connector_url }}/api/settings?search=name%20%3D%20instance_id" + user: "{{ foreman_cloud_connector_user }}" + password: "{{ foreman_cloud_connector_password }}" + return_content: true + validate_certs: true + force_basic_auth: true + register: satellite_uuid_json + +- name: Find receptor configs + find: + paths: /etc/receptor + file_type: directory + register: receptor_configs + +- include_tasks: delete_source.yaml + loop: "{{ receptor_configs['files'] }}" + +- name: Check if foreman-maintain installed + ansible.builtin.package_facts: + manager: auto + +- name: Collect service facts + ansible.builtin.service_facts: + +- name: Stop any receptor services + ansible.builtin.service: + state: stopped + enabled: false + name: "{{ item.name }}" + loop: "{{ ansible_facts.services.values() | selectattr('name', 'regex', 'receptor\\@.+.service') | list }}" + +- name: Remove receptor packages + yum: + state: absent + name: + - receptor + - python3-receptor-satellite + - ansiblerole-satellite-receptor-installer + disable_plugin: foreman-protector + +- name: Cleanup receptor config + file: + state: absent + path: /etc/receptor + +- name: Remove receptor service file + file: + state: absent + path: /etc/systemd/system/receptor@.service diff --git a/roles/cloud_connector/tasks/delete_source.yaml b/roles/cloud_connector/tasks/delete_source.yaml new file mode 100644 index 0000000..ef82454 --- /dev/null +++ b/roles/cloud_connector/tasks/delete_source.yaml @@ -0,0 +1,20 @@ +--- +- name: Get source record + ansible.builtin.uri: + url: "https://{{ foreman_cloud_connector_console_redhat_host }}/api/sources/v3.1/sources?filter[source_ref]={{ satellite_uuid_json.json.results[0].value }}" + client_cert: "{{ item.path }}/cert.pem" + client_key: "{{ item.path }}/key.pem" + return_content: true + register: source_record_response + +- name: Delete Source + vars: + source_id: "{{ source_record_response.json.data[0].id }}" + when: "source_record_response.json.data | length == 1" + ansible.builtin.uri: + url: "https://{{ foreman_cloud_connector_console_redhat_host }}/api/sources/v3.1/sources/{{ source_id }}" + client_cert: "{{ item.path }}/cert.pem" + client_key: "{{ item.path }}/key.pem" + method: "DELETE" + status_code: + - 204 diff --git a/roles/cloud_connector/tasks/main.yml b/roles/cloud_connector/tasks/main.yml new file mode 100644 index 0000000..330cfef --- /dev/null +++ b/roles/cloud_connector/tasks/main.yml @@ -0,0 +1,62 @@ +--- +- name: Install yggdrasil-worker-forwarder and rhc + yum: + name: + - rhc + - yggdrasil-worker-forwarder + disable_plugin: foreman-protector + +- name: Create workers directory + file: + state: directory + path: "/etc/rhc/workers" + owner: root + group: root + mode: 0755 + +- name: Configure rhc-cloud-connector-worker + ansible.builtin.template: + src: "foreman_rh_cloud.toml.j2" + dest: "{{ foreman_cloud_connector_config_file }}" + owner: root + group: root + mode: 0640 + +- name: Create rhcd worker + ansible.builtin.copy: + dest: /usr/libexec/rhc/foreman-rh-cloud-worker + content: | + #!/bin/bash + + CONFIG_FILE="{{ foreman_cloud_connector_config_file }}" exec /usr/libexec/yggdrasil-worker-forwarder + owner: root + group: root + mode: 0755 + +- name: Ensure rhcd started + service: + name: rhcd + state: started + +- name: Read client ID from CN of consumer + ansible.builtin.command: openssl x509 -in /etc/pki/consumer/cert.pem -subject -noout + register: cert_output + when: cert_output is not defined + +- name: Set client ID in Satellite + ansible.builtin.uri: + url: "{{ foreman_cloud_connector_url }}/api/settings/rhc_instance_id" + user: "{{ foreman_cloud_connector_user }}" + password: "{{ foreman_cloud_connector_password }}" + body: + setting: + value: "{{ client_id }}" + method: "PUT" + validate_certs: "{{ foreman_cloud_connector_validate_certs }}" + force_basic_auth: true + body_format: json + vars: + client_id: "{{ cert_output.stdout.replace('subject= /CN=', '') }}" + +- name: Cleanup receptor + include: cleanup_receptor.yml diff --git a/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 b/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 new file mode 100644 index 0000000..90e05f0 --- /dev/null +++ b/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 @@ -0,0 +1,8 @@ +exec = "/usr/libexec/yggdrasil-worker-forwarder" +protocol = "grpc" +env = [ + "FORWARDER_USER={{ foreman_cloud_connector_user }}", + "FORWARDER_PASSWORD={{ foreman_cloud_connector_password }}", + "FORWARDER_URL={{ foreman_cloud_connector_url }}", + "FORWARDER_HANDLER=foreman_rh_cloud" +] From b09cafba200f6c624f41efc61d78a3854a0599c2 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Mon, 25 Apr 2022 11:42:01 -0400 Subject: [PATCH 07/11] pin rstcheck to the same version as in ansible --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e667776..ab1f8d4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ PyYAML docker -rstcheck +rstcheck==3.3.1 # from https://github.com/ansible/ansible/raw/devel/test/sanity/code-smell/rstcheck.requirements.txt cryptography<3.1; python_version < '3.6' -r requirements.txt pylint==2.6.0; python_version >= '3.6' From 917cf531e09cbaece5c68d3f5afdeefb2cde409f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 00:06:03 +0000 Subject: [PATCH 08/11] Bump github/codeql-action from 1 to 2 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index afffe60..4b0fe20 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,9 +34,9 @@ jobs: if: ${{ github.event_name == 'pull_request' }} - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From b469854cb5710db62bd67853aeaaab83cc29dd44 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Mon, 25 Apr 2022 16:19:00 -0400 Subject: [PATCH 09/11] Release 1.1.0 --- CHANGELOG.rst | 8 ++++++++ changelogs/changelog.yaml | 4 ++++ galaxy.yml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5b06fe8..6892987 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,14 @@ theforeman.operations Release Notes .. contents:: Topics +v1.1.0 +====== + +Minor Changes +------------- + +- cloud_connector - new role for installing Cloud Connector + v1.0.2 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index c63d2f1..245c8f4 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -23,3 +23,7 @@ releases: fragments: - installer-checkmode-fix.yml release_date: '2022-03-25' + 1.1.0: + minor_changes: + - cloud_connector - new role for installing Cloud Connector + release_date: '2022-04-25' diff --git a/galaxy.yml b/galaxy.yml index 3675709..17ba100 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ authors: - "Kyle Williams " - "Matthias Dellweg <2500@gmx.de>" - "willtome " -version: "1.1.0-dev" +version: "1.1.0" license: - "GPL-3.0-or-later" tags: From 5cb811c6a4c4ba29323c68ebee4f56d9fb4d3dd4 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Tue, 26 Apr 2022 09:39:04 -0400 Subject: [PATCH 10/11] Update branding to not change foreman_rh_cloud --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4cc8e9c..480f21b 100644 --- a/Makefile +++ b/Makefile @@ -102,9 +102,11 @@ branding: sed -i 's/theforeman-foreman/redhat-satellite-operations/g' .github/workflows/*.yml sed -i 's/Foreman Operations Collection/Red Hat Satellite Operations Collection/g' docs/index.rst docs/conf.py sed -i 's/The Foreman Project/Red Hat, Inc./g' docs/conf.py + sed -i 's/Foreman/Satellite/g' roles/*/README.md roles/*/*/*.yml sed -i '/FOREMAN_\w/ s/FOREMAN_/SATELLITE_/g' Makefile sed -i '/foreman_proxy_\w/ s/foreman_proxy_/satellite_capsule_/g' roles/*/README.md roles/*/*/*.yml - sed -i '/foreman_\w/ s/foreman_/satellite_/g' roles/*/README.md roles/*/*/*.yml + sed -i '/foreman_\w/ s/foreman_/satellite_/g' roles/*/README.md roles/*/*/*.yml roles/*/*/*.j2 + sed -i 's/satellite_rh_cloud/foreman_rh_cloud/g' roles/*/README.md roles/*/*/*.yml roles/*/*/*.j2 sed -i 's/foreman-installer/satellite-installer/g' roles/*/README.md roles/*/*/*.yml rm -rf roles/puppet_repositories roles/foreman_repositories roles/postgresql_upgrade roles/ansible_repositories [ ! -d roles/foreman_proxy_certs_generate ] || mv roles/foreman_proxy_certs_generate roles/capsule_certs_generate From ec847b4ca02c28c9fe6fbf8de3bc751b5ae50de6 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Tue, 26 Apr 2022 09:44:09 -0400 Subject: [PATCH 11/11] Update branding for 1.1.0 --- roles/cloud_connector/README.md | 16 ++++++++-------- roles/cloud_connector/defaults/main.yml | 6 +++--- roles/cloud_connector/tasks/cleanup_receptor.yml | 6 +++--- roles/cloud_connector/tasks/main.yml | 12 ++++++------ .../templates/foreman_rh_cloud.toml.j2 | 6 +++--- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/roles/cloud_connector/README.md b/roles/cloud_connector/README.md index 0a154ba..232d018 100644 --- a/roles/cloud_connector/README.md +++ b/roles/cloud_connector/README.md @@ -1,4 +1,4 @@ -theforeman.operations.cloud_connector +redhat.satellite_operations.cloud_connector ===================================== Install and configure Red Hat Cloud Connector @@ -8,9 +8,9 @@ Role Variables Required: -- `foreman_cloud_connector_url`: The URL of the Foreman server. -- `foreman_cloud_connector_user`: The username cloud connector will use to talk to Foreman API. -- `foreman_cloud_connector_password`: The password cloud connector will use to talk to Foreman API. +- `satellite_cloud_connector_url`: The URL of the Satellite server. +- `satellite_cloud_connector_user`: The username cloud connector will use to talk to Satellite API. +- `satellite_cloud_connector_password`: The password cloud connector will use to talk to Satellite API. Example Playbooks ----------------- @@ -21,9 +21,9 @@ Configure Cloud Connector: ```yaml - hosts: target-host roles: - - role: theforeman.operations.cloud_connector + - role: redhat.satellite_operations.cloud_connector vars: - foreman_cloud_connector_url: https://foreman.example.com - foreman_cloud_connector_user: admin - foreman_cloud_connector_password: changeme + satellite_cloud_connector_url: https://satellite.example.com + satellite_cloud_connector_user: admin + satellite_cloud_connector_password: changeme ``` diff --git a/roles/cloud_connector/defaults/main.yml b/roles/cloud_connector/defaults/main.yml index 132dacd..03976bc 100644 --- a/roles/cloud_connector/defaults/main.yml +++ b/roles/cloud_connector/defaults/main.yml @@ -1,4 +1,4 @@ --- -foreman_cloud_connector_console_redhat_host: cert.cloud.redhat.com -foreman_cloud_connector_config_file: /etc/rhc/workers/foreman_rh_cloud.toml -foreman_cloud_connector_validate_certs: true +satellite_cloud_connector_console_redhat_host: cert.cloud.redhat.com +satellite_cloud_connector_config_file: /etc/rhc/workers/foreman_rh_cloud.toml +satellite_cloud_connector_validate_certs: true diff --git a/roles/cloud_connector/tasks/cleanup_receptor.yml b/roles/cloud_connector/tasks/cleanup_receptor.yml index c536084..bc33a64 100644 --- a/roles/cloud_connector/tasks/cleanup_receptor.yml +++ b/roles/cloud_connector/tasks/cleanup_receptor.yml @@ -1,9 +1,9 @@ --- - name: Identify Satellite ID from Satellite ansible.builtin.uri: - url: "{{ foreman_cloud_connector_url }}/api/settings?search=name%20%3D%20instance_id" - user: "{{ foreman_cloud_connector_user }}" - password: "{{ foreman_cloud_connector_password }}" + url: "{{ satellite_cloud_connector_url }}/api/settings?search=name%20%3D%20instance_id" + user: "{{ satellite_cloud_connector_user }}" + password: "{{ satellite_cloud_connector_password }}" return_content: true validate_certs: true force_basic_auth: true diff --git a/roles/cloud_connector/tasks/main.yml b/roles/cloud_connector/tasks/main.yml index 330cfef..ff02488 100644 --- a/roles/cloud_connector/tasks/main.yml +++ b/roles/cloud_connector/tasks/main.yml @@ -17,7 +17,7 @@ - name: Configure rhc-cloud-connector-worker ansible.builtin.template: src: "foreman_rh_cloud.toml.j2" - dest: "{{ foreman_cloud_connector_config_file }}" + dest: "{{ satellite_cloud_connector_config_file }}" owner: root group: root mode: 0640 @@ -28,7 +28,7 @@ content: | #!/bin/bash - CONFIG_FILE="{{ foreman_cloud_connector_config_file }}" exec /usr/libexec/yggdrasil-worker-forwarder + CONFIG_FILE="{{ satellite_cloud_connector_config_file }}" exec /usr/libexec/yggdrasil-worker-forwarder owner: root group: root mode: 0755 @@ -45,14 +45,14 @@ - name: Set client ID in Satellite ansible.builtin.uri: - url: "{{ foreman_cloud_connector_url }}/api/settings/rhc_instance_id" - user: "{{ foreman_cloud_connector_user }}" - password: "{{ foreman_cloud_connector_password }}" + url: "{{ satellite_cloud_connector_url }}/api/settings/rhc_instance_id" + user: "{{ satellite_cloud_connector_user }}" + password: "{{ satellite_cloud_connector_password }}" body: setting: value: "{{ client_id }}" method: "PUT" - validate_certs: "{{ foreman_cloud_connector_validate_certs }}" + validate_certs: "{{ satellite_cloud_connector_validate_certs }}" force_basic_auth: true body_format: json vars: diff --git a/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 b/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 index 90e05f0..387689e 100644 --- a/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 +++ b/roles/cloud_connector/templates/foreman_rh_cloud.toml.j2 @@ -1,8 +1,8 @@ exec = "/usr/libexec/yggdrasil-worker-forwarder" protocol = "grpc" env = [ - "FORWARDER_USER={{ foreman_cloud_connector_user }}", - "FORWARDER_PASSWORD={{ foreman_cloud_connector_password }}", - "FORWARDER_URL={{ foreman_cloud_connector_url }}", + "FORWARDER_USER={{ satellite_cloud_connector_user }}", + "FORWARDER_PASSWORD={{ satellite_cloud_connector_password }}", + "FORWARDER_URL={{ satellite_cloud_connector_url }}", "FORWARDER_HANDLER=foreman_rh_cloud" ]