From 959bdb36132c7d30327000e4a0c3bea546cc4eec Mon Sep 17 00:00:00 2001 From: Cory McKee Date: Tue, 3 Sep 2019 09:21:57 -0400 Subject: [PATCH 1/4] added a post config --- tasks/main.yml | 1 + tasks/post_config.yml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tasks/post_config.yml diff --git a/tasks/main.yml b/tasks/main.yml index ef432b4..973ae84 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,3 +6,4 @@ - include: install_software.yml - include: install_satellite.yml - include: configure_satellite.yml +- include post_config.yml diff --git a/tasks/post_config.yml b/tasks/post_config.yml new file mode 100644 index 0000000..3d6367e --- /dev/null +++ b/tasks/post_config.yml @@ -0,0 +1,14 @@ +--- +# TASKS + +- name: Change "Delete Host upon unregister" from no to yes + become: yes + shell: > + hammer settings set --name "unregister_delete_host" --value "true" + failed_when: false + +- name: Change "Installable errata from Content View" from no to yes + shell: > + hammer settings set --name "errata_status_installable" --value "true" + failed_when: false + From ad21ae48a6fcf06286617ba1562bed86a1dd1d0b Mon Sep 17 00:00:00 2001 From: cojmckee <32520575+cojmckee@users.noreply.github.com> Date: Wed, 19 Feb 2020 10:20:58 -0600 Subject: [PATCH 2/4] Update registration.yml Added pool id to the registration --- tasks/registration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/registration.yml b/tasks/registration.yml index e8a1d8a..502d7a9 100644 --- a/tasks/registration.yml +++ b/tasks/registration.yml @@ -6,6 +6,7 @@ username: "{{ satellite_deployment_rhn_user }}" password: "{{ satellite_deployment_rhn_password }}" consumer_name: "{{ satellite_deployment_hostname_full }}" + pool: '^(Red Hat Satellite Infrastructure Subscription)$' tags: - "rhn" - "skip_ansible_lint" # ANSIBLE0012 From 12ef618bd81042c047b204efd7e3b5e04c1703a4 Mon Sep 17 00:00:00 2001 From: cojmckee <32520575+cojmckee@users.noreply.github.com> Date: Wed, 19 Feb 2020 10:25:13 -0600 Subject: [PATCH 3/4] Update post_config.yml update --- tasks/post_config.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tasks/post_config.yml b/tasks/post_config.yml index 3d6367e..41b7dab 100644 --- a/tasks/post_config.yml +++ b/tasks/post_config.yml @@ -1,14 +1,21 @@ --- # TASKS +- name: Configuring Satellite 6 server | Common Settings + theforeman.foreman.foreman_setting: + username: "{{ satellite_deployment_admin_username }}" + password: "{{ satellite_deployment_admin_password }}" + server_url: "https://{{ ansible_fqdn }}" + name: "{{ item.name }}" + value: "{{ item.value }}" + with_items: + - "{{ satellite_settings }}" -- name: Change "Delete Host upon unregister" from no to yes - become: yes - shell: > - hammer settings set --name "unregister_delete_host" --value "true" - failed_when: false - -- name: Change "Installable errata from Content View" from no to yes - shell: > - hammer settings set --name "errata_status_installable" --value "true" - failed_when: false +- name: Configuring Satellite 6 server | Disconnected Settings + theforeman.foreman.foreman_setting: + username: "{{ satellite_deployment_admin_username }}" + password: "{{ satellite_deployment_admin_password }}" + server_url: "https://{{ ansible_fqdn }}" + name: "content_disconnected" + value: "true" + when: rhn_connect == 'disconnect' From 032c7106927883f8a21b82689c1fbdeea7e493e1 Mon Sep 17 00:00:00 2001 From: cojmckee <32520575+cojmckee@users.noreply.github.com> Date: Wed, 19 Feb 2020 10:27:15 -0600 Subject: [PATCH 4/4] Update main.yml --- defaults/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 88313a5..56111f4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -43,6 +43,16 @@ satellite_deployment_repositories: - { product_name: 'Red Hat Enterprise Linux Server', name_repo: 'Red Hat Satellite Tools {{ satellite_deployment_version }} (for RHEL 7 Server) (RPMs)', architecture: 'x86_64', state: enable} - { product_name: 'Red Hat Enterprise Linux Server', name_repo: 'Red Hat Enterprise Linux 7 Server - Extras (RPMs)', architecture: 'x86_64', state: enable} +satellite_settings: + - name: "default_download_policy" + value: "immediate" + - name: "unregister_delete_host" + value: "true" + - name: "errata_status_installable" + value: "true" + - name: "login_text" + value: "I've read & consent to terms in IS user agreement." + # configure_capsules: satellite_deployment_puppet_env: "production"