diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0ea8390..ab6c9b0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,14 @@ redhat.satellite-operations Release Notes .. contents:: Topics +v1.2.0 +====== + +Minor Changes +------------- + +- add HTTP proxy support for cloud connector + v1.1.1 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index a5bde9a..c7e3278 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -24,14 +24,19 @@ releases: - installer-checkmode-fix.yml release_date: '2022-03-25' 1.1.0: - release_date: '2022-04-25' changes: minor_changes: - cloud_connector - new role for installing Cloud Connector (https://github.com/theforeman/foreman-operations-collection/pull/85) fragments: - 85-fix-forwarder-url.yml + release_date: '2022-04-25' 1.1.1: changes: bugfixes: - update FORWARDER_URL for cloud connector release_date: '2022-05-09' + 1.2.0: + changes: + minor_changes: + - add HTTP proxy support for cloud connector + release_date: '2022-05-16' diff --git a/galaxy.yml b/galaxy.yml index 13ec65c..7016884 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -11,7 +11,7 @@ authors: - "Kyle Williams " - "Matthias Dellweg <2500@gmx.de>" - "willtome " -version: "1.1.1" +version: "1.2.0" license: - "GPL-3.0-or-later" tags: diff --git a/roles/cloud_connector/README.md b/roles/cloud_connector/README.md index 232d018..3a09477 100644 --- a/roles/cloud_connector/README.md +++ b/roles/cloud_connector/README.md @@ -12,6 +12,10 @@ Required: - `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. +Optional: + +- `satellite_cloud_connector_http_proxy`: HTTP proxy for RHC to use + Example Playbooks ----------------- diff --git a/roles/cloud_connector/handlers/main.yml b/roles/cloud_connector/handlers/main.yml new file mode 100644 index 0000000..e08bcb1 --- /dev/null +++ b/roles/cloud_connector/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: Restart rhcd + ansible.builtin.service: + name: rhcd + state: restarted + daemon_reload: true diff --git a/roles/cloud_connector/tasks/http_proxy.yml b/roles/cloud_connector/tasks/http_proxy.yml new file mode 100644 index 0000000..6754131 --- /dev/null +++ b/roles/cloud_connector/tasks/http_proxy.yml @@ -0,0 +1,18 @@ +--- +- name: Create systemd drop-in directory + ansible.builtin.file: + state: directory + path: /etc/systemd/system/rhcd.service.d + owner: root + group: root + mode: 0755 + +- name: Deploy HTTP proxy systemd drop-in file + ansible.builtin.template: + src: "proxy.conf.j2" + dest: /etc/systemd/system/rhcd.service.d/proxy.conf + owner: root + group: root + mode: 0640 + notify: + - Restart rhcd diff --git a/roles/cloud_connector/tasks/main.yml b/roles/cloud_connector/tasks/main.yml index ff02488..6d0c4c3 100644 --- a/roles/cloud_connector/tasks/main.yml +++ b/roles/cloud_connector/tasks/main.yml @@ -58,5 +58,9 @@ vars: client_id: "{{ cert_output.stdout.replace('subject= /CN=', '') }}" +- name: Configure HTTP proxy + include: http_proxy.yml + when: satellite_cloud_connector_http_proxy is defined + - name: Cleanup receptor include: cleanup_receptor.yml diff --git a/roles/cloud_connector/templates/proxy.conf.j2 b/roles/cloud_connector/templates/proxy.conf.j2 new file mode 100644 index 0000000..2965c4b --- /dev/null +++ b/roles/cloud_connector/templates/proxy.conf.j2 @@ -0,0 +1,3 @@ +[Service] +Environment=HTTPS_PROXY={{ satellite_cloud_connector_http_proxy }} +Environment=NO_PROXY={{ satellite_cloud_connector_url }}