{"id":17797441,"url":"https://github.com/sean797/ansible-role-foreman_installer","last_synced_at":"2025-08-12T06:33:44.408Z","repository":{"id":97962163,"uuid":"91678151","full_name":"sean797/ansible-role-foreman_installer","owner":"sean797","description":"Ansible role to interacte with the Puppet based foreman-installer","archived":false,"fork":false,"pushed_at":"2018-07-25T08:45:38.000Z","size":47,"stargazers_count":11,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T03:22:51.785Z","etag":null,"topics":["ansible-role","foreman","foreman-installer","katello","redhat-satellite","satellite6","theforeman"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/sean797/foreman_installer/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sean797.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T10:00:24.000Z","updated_at":"2019-11-30T16:07:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"b64864b5-a5e9-4552-ae5d-c7c11a6ceda9","html_url":"https://github.com/sean797/ansible-role-foreman_installer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sean797/ansible-role-foreman_installer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean797%2Fansible-role-foreman_installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean797%2Fansible-role-foreman_installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean797%2Fansible-role-foreman_installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean797%2Fansible-role-foreman_installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sean797","download_url":"https://codeload.github.com/sean797/ansible-role-foreman_installer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean797%2Fansible-role-foreman_installer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270014268,"owners_count":24512615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible-role","foreman","foreman-installer","katello","redhat-satellite","satellite6","theforeman"],"created_at":"2024-10-27T11:55:56.245Z","updated_at":"2025-08-12T06:33:44.364Z","avatar_url":"https://github.com/sean797.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# foreman_installer [![Build Status](https://travis-ci.org/sean797/ansible-role-foreman_installer.svg?branch=master)](https://travis-ci.org/sean797/ansible-role-foreman_installer)\n\nRole to interact with foreman-installer \n\n\n## Requirements\n\nN/A\n\n## Role Variables\n\n```yaml\nvars:\n  foreman_installer:\n    foreman_installer_pkg:                        # foreman installer package. You probably want either \"foreman-installer\" or \"katello\".\n    foreman_installer_verbose:                    # Run the installe with -v option\n    foreman_installer_scenario:                   # Scenario. Required\n    foreman_installer_scenarios_answers:          # Dict of custom answers that for your scenario. See [FAQs](https://github.com/sean797/ansible-role-foreman_installer#faqs). \n    foreman_installer_options: []                 # Array of extra options to pass to whenever the installer is ran\n    foreman_installer_generate_proxy_certs_from:  # String containing the ansible host to Generate Certificates for a Katello Smart Proxy\n    foreman_installer_katello_ca:                 # String containing the custom CA cert. Katello \u0026 Katello Smart Proxy Only.\n    foreman_installer_katello_cert:               # String containing the custom cert. Katello Only.\n    foreman_installer_katello_key:                # String containing the custom key. Katello Only.\n    foreman_installer_katello_csr:                # String containing the custom csr. Katello Only.\n    foreman_installer_katello_proxy_cert:         # String containing the custom cert. Katello Smart Proxy Only.\n    foreman_installer_katello_proxy_key:          # String containing the custom key. Katello Smart Proxy Only.\n    foreman_installer_katello_proxy_csr:          # String containing the custom csr. Katello Smart Proxy Only.\n    foreman_installer_katello_certs_dir:          # Directory to store the certificates\n    foreman_installer_update_certs: False         # Set to True to force Certificate Update.\n    foreman_installer_update_certs_tar: False     # Set to True to force new Proxy Certificates tar to be generated \u0026 applied.\n\n    # Advanced Options\n    foreman_installer_patches:                    # Array of Dicts allowing patches against the installer files. See defaults/main.yml for an example.\n    foreman_installer_encryption_key:             # Encryption key that is put into /etc/foreman/encryption_key.rb. Must be the same across a Foreman cluster.\n    foreman_installer_katello_cluster_group:      # Name of the inventory group will all Katello servers in. Requires http://projects.theforeman.org/issues/20021\n```\n\n## Example Playbook\n\n### Basic Foreman scenario:\n\n```yaml\n    - hosts:\n      - foreman.example.com\n      roles:\n        - role: foreman_installer\n          foreman_installer_scenario: foreman\n          foreman_installer_scenarios_answers:\n            foreman:\n              admin_password: changeme\n```\n\n### Katello scenario with custom certificates:\n\n```yaml\n    - hosts:\n      - katello.example.com\n    var_files:\n      - group_vars/vault_certs.yml\n    roles:\n       - role: foreman_installer\n         foreman_installer_pkg: katello\n         foreman_installer_scenario: katello\n         foreman_installer_scenarios_answers:\n           foreman:\n             admin_password: changeme\n         foreman_installer_katello_ca: \"{{ vault_foreman_installer_katello_ca }}\"\n         foreman_installer_katello_cert: \"{{ vault_katello_cert }}\"\n         foreman_installer_katello_key: \"{{ vault_foreman_installer_katello_key }}\"\n         foreman_installer_katello_csr: \"{{ vault_foreman_installer_katello_csr }}\"\n```\n\n### Katello Proxy scenario with supplied certificates tar:\n\n```yaml\n    - hosts:\n      - foreman-proxy.example.com\n    roles:\n       - role: foreman_installer\n         foreman_installer_pkg: foreman-proxy-content\n         foreman_installer_scenario: foreman-proxy-content\n         foreman_installer_scenarios_answers:\n           foreman_proxy_content:\n             certs_tar: /root/foreman-proxy.example.com-certs.tar #This must already be on-disk\n             pulp_oauth_secret: \u003coutputted when generating the certifcates tar\u003e\n             parent_fqdn: katello.example.com\n           foreman_proxy:\n             oauth_consumer_key: \u003coutputted when generating the certifcates tar\u003e\n             oauth_consumer_secret: \u003coutputted when generating the certifcates tar\u003e\n             foreman_base_url: https://katello.example.com\n             trusted_hosts:\n               - katello.example.com\n               - \"{{ ansible_fqdn }}\"\n```\n\n### Katello Proxy scenario without supplied certificates tar:\n\n```yaml\n    - hosts:\n      - foreman-proxy.example.com\n    roles:\n       - role: foreman_installer\n         foreman_installer_pkg: foreman-proxy-content\n         foreman_installer_scenario: foreman-proxy-content\n         foreman_installer_generate_proxy_certs_from: katello.example.com\n         foreman_installer_katello_proxy_cert: \"{{ vault_proxy1_cert }}\"\n         foreman_installer_katello_proxy_key: \"{{ vault_proxy1_key }}\"\n         foreman_installer_katello_proxy_csr: \"{{ vault_proxy1_csr }}\"\n         foreman_installer_katello_ca: \"{{ vault_foreman_installer_katello_ca }}\"\n         foreman_installer_scenarios_answers:\n           foreman_proxy_content:\n             parent_fqdn: katello.example.com\n           foreman_proxy:\n             foreman_base_url: https://katello.example.com\n             trusted_hosts:\n               - katello.example.com\n```\n\n### Katello cluster with custom certificates: \n\nCouple of things to note:\n - All the key, secret \u0026 password answers are there as these must be the same across the cluster. Please don't use the values in this example.\n - The `foreman_installer_patches` options was only used to backport http://projects.theforeman.org/issues/20021 to my Katello version.\n\n```yaml\n    - hosts:\n      - katello1.example.com\n      - katello2.example.com\n    var_files:\n      - group_vars/vault_certs.yml\n    roles:\n       - role: foreman_installer\n         foreman_installer_pkg: katello\n         foreman_installer_scenario: katello\n         foreman_installer_scenarios_answers:\n           foreman_proxy_content:\n             pulp_oauth_secret: uC2qfoQfPVhdFTBEbS89ykZWQz6BVpcu\n           foreman:\n             db_password: KmVzXiWuVWCUZrn4kWF8PRsFG4H4ecqo\n             initial_location: Global\n             initial_organization: AMCE\n             admin_password: changeme\n             servername: katello.example.com\n             foreman_url: https://katello.example.com\n             oauth_consumer_key: xmi95B9qNQoX6owdg4MT8WMCBNhgudYy\n             oauth_consumer_secret: x6TheD8Z9ZBtgdgBUrqSbPR2rh6k7UQE\n           foreman_proxy:\n             registered_name: katello.example.com\n             registered_proxy_url: https://katello.example.com:9090\n             oauth_consumer_key: xmi95B9qNQoX6owdg4MT8WMCBNhgudYy\n             oauth_consumer_secret: x6TheD8Z9ZBtgdgBUrqSbPR2rh6k7UQE\n             foreman_base_url: https://katello.example.com\n             trusted_hosts:\n               - katello.example.com\n               - katello1.example.com\n               - katello2.example.com\n           katello:\n             oauth_secret: uC2qfoQfPVhdFTBEbS89ykZWQz6BVpcu\n         foreman_installer_custom_hiera:\n           candlepin::db_password: L45DkebcvWdgXG9ryzWkfavSvQ23dw8U\n         foreman_installer_encryption_key: dfc6799e4d722a4e86c786cb0fc96cbbae0151f6\n         foreman_installer_katello_cluster_group: katello-servers\n         foreman_installer_katello_ca: \"{{ vault_foreman_installer_katello_ca }}\"\n         foreman_installer_katello_cert: \"{{ vault_katello_cert }}\" # Certificate must use dns-alt-names with all cluster Hostnames and VIP hostname.\n         foreman_installer_katello_key: \"{{ vault_foreman_installer_katello_key }}\"\n         foreman_installer_katello_csr: \"{{ vault_foreman_installer_katello_csr }}\"\n         foreman_installer_patches:\n           - { src: files/katello_certs_tools.patch, basedir: /usr/lib/python2.7/site-packages/ }\n           - { src: files/puppet-certs.patch, basedir: /usr/share/katello-installer-base/modules/certs/ }\n```\n\n### Foreman proxy cluster that connected to a Katello cluster with custom certificates: \n\nEach proxy is there own proxy in Foreman, but a client can use a VIP address to connect to either of them for packages.\n\n```yaml\n    - hosts:\n      - foreman-proxy1.example.com\n      - foreman-proxy2.example.com\n    roles:\n       - role: foreman_installer\n         foreman_installer_pkg: foreman-proxy-content\n         foreman_installer_scenario: foreman-proxy-content\n         foreman_installer_generate_proxy_certs_from: katello1.example.com\n         foreman_installer_katello_proxy_cert: \"{{ vault_proxy1_cert }}\" # Certificate must use dns-alt-names with all cluster Hostnames and VIP hostname.\n         foreman_installer_katello_proxy_key: \"{{ vault_proxy1_key }}\"\n         foreman_installer_katello_proxy_csr: \"{{ vault_proxy1_csr }}\"\n         foreman_installer_katello_ca: \"{{ vault_foreman_installer_katello_ca }}\"\n         foreman_installer_scenarios_answers:\n           foreman_proxy_content:\n             parent_fqdn: katello.example.com\n           foreman_proxy:\n             foreman_base_url: https://katello.example.com\n             trusted_hosts:\n               - katello1.example.com\n               - katello2.example.com\n               - katello.example.com\n               - foreman-proxy1.example.com\n               - foreman-proxy2.example.com\n               - foreman-proxy.example.com\n```\n\n## FAQs\n\n### How do I know what options to put in `foreman_installer_scenarios_answers` var? ###\n\nYou need to check in /etc/foreman-installer/scenarios.d/{{ foreman_installer_scenario }}-answers.yaml file. Storing answers like this makes the role idempotent, if you use `foreman_installer_options` instead we would have run the installer during every run to make sure its applied. Whereas this method allows us to manage the answer file and run the installer as a handler (only if something changes).\n\n### How do I remove options from `foreman_installer_scenarios_answers` var? ###\n \nYou'll need to set the value to `null`.\n \n```yaml\nforeman_installer_scenarios_answers:\n  foreman:\n    admin_password: changeme\n    admin_last_name: null\n```\n\n### How do I enable or disable a plug-in?\n\nTo enable set the value to an empty hash. To disable set the value to false.\n\n```yaml\nforeman_installer_scenarios_answers:\n  foreman:\n    admin_password: changeme\n    admin_last_name: null\n  \"foreman::plugin::remote_execution\": {}\n  \"foreman::plugin::discovery\": false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean797%2Fansible-role-foreman_installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean797%2Fansible-role-foreman_installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean797%2Fansible-role-foreman_installer/lists"}