From eefe5019238a7b88bda0a9df1a6d9b02267e4902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Thu, 11 Aug 2022 13:14:55 +0200 Subject: [PATCH] Update rhsm_disable_container_check default value Following [1], the right way to disable the feature is to set the env var value to an empty string. Until now, whatever the value was (even False), it was enabled, because the var was in the env. [1] https://github.com/candlepin/subscription-manager/pull/3097 Change-Id: I54e1452dc4bb6e2e25fa9567335b62b730000e83 --- tasks/portal.yml | 4 ++-- tasks/register.yml | 2 +- tasks/satellite-6.yml | 2 +- tasks/unregister.yml | 2 +- vars/main.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/portal.yml b/tasks/portal.yml index e4729fa..ee832f9 100644 --- a/tasks/portal.yml +++ b/tasks/portal.yml @@ -22,7 +22,7 @@ server_proxy_password: "{{ rhsm_rhsm_proxy_password | default(omit) }}" register: subscrition_result environment: - SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check | bool }}" + SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check }}" tags: - rhsm - rhsm_register @@ -31,7 +31,7 @@ - name: Clean all local subscription data command: subscription-manager clean environment: - SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check | bool }}" + SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check }}" - import_tasks: register.yml diff --git a/tasks/register.yml b/tasks/register.yml index 086f63b..ed49de2 100644 --- a/tasks/register.yml +++ b/tasks/register.yml @@ -17,7 +17,7 @@ server_proxy_password: "{{ rhsm_rhsm_proxy_password | default(omit) }}" register: subscrition_result environment: - SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check | bool }}" + SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check }}" tags: - rhsm - rhsm_register diff --git a/tasks/satellite-6.yml b/tasks/satellite-6.yml index b9b37f1..4ad963b 100644 --- a/tasks/satellite-6.yml +++ b/tasks/satellite-6.yml @@ -41,5 +41,5 @@ - name: SATELLITE 6 | Execute katello-rhsm-consumer shell: katello-rhsm-consumer environment: - SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check | bool }}" + SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check }}" when: katello_rpm.changed diff --git a/tasks/unregister.yml b/tasks/unregister.yml index a26e6ee..c55f56d 100644 --- a/tasks/unregister.yml +++ b/tasks/unregister.yml @@ -1,7 +1,7 @@ - name: Unregister Red Hat subscription command: subscription-manager remove --all environment: - SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check | bool }}" + SMDEV_CONTAINER_OFF: "{{ rhsm_disable_container_check }}" become: true tags: - rhsm_unregister diff --git a/vars/main.yml b/vars/main.yml index 676b534..556616f 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,6 +1,6 @@ rhsm_repo_ca_cert: "{{ '%(ca_cert_dir)s' ~ ('katello-server-ca.pem' if rhsm_method == 'satellite' else 'redhat-uep.pem') }}" rhsm_full_refresh_on_yum: "{{ 1 if rhsm_method == 'satellite' else 0 }}" -rhsm_disable_container_check: false +rhsm_disable_container_check: '' rhsm_yum_plugins: - file: product-id.conf option: enabled