{"id":24849366,"url":"https://github.com/bugbiteme/demo-ansible-aap-host","last_synced_at":"2026-01-07T04:03:36.589Z","repository":{"id":185392893,"uuid":"618569094","full_name":"bugbiteme/demo-ansible-aap-host","owner":"bugbiteme","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-13T18:44:35.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T12:36:19.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugbiteme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-24T18:57:50.000Z","updated_at":"2023-03-24T18:59:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"52c7d5ea-3a47-4811-a9cf-05660fee08c6","html_url":"https://github.com/bugbiteme/demo-ansible-aap-host","commit_stats":null,"previous_names":["bugbiteme/demo-ansible-aap-host"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-ansible-aap-host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-ansible-aap-host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-ansible-aap-host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-ansible-aap-host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugbiteme","download_url":"https://codeload.github.com/bugbiteme/demo-ansible-aap-host/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245642742,"owners_count":20648912,"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","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":[],"created_at":"2025-01-31T12:30:58.608Z","updated_at":"2026-01-07T04:03:36.504Z","avatar_url":"https://github.com/bugbiteme.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instructions\n\nYou can use terraform on its own to spin up a number of Red Hat Enterprise Linux \nEC2 instances in AWS (version 9.x) with the resources needed to install AAP as a \nhybrid node configuration\n\nFeel free to set the variables how you see fit\n\nTerraform also produces a dynamic Ansible inventory file that can be used in\nplaybooks for configuring this sytems.\n\n## Prerequisits\nInstall the following on your local system:\n - AWS cli\n - terraform\n - ansible (core)\n\n## To run the terraform script on its own  \n`terraform init`  \n`terraform apply` (type \"yes\" when prompted)  \n\noutput shows all the public IP addresses, as well as a cli string to ssh into one of \nthem.\n\ndelete everything by typing  \n`terraform destroy`\n\n\n## To run them on one swoop\nI have created a helper script called 'rhel-provision-and-config.sh' that calls terraform and then ansible \n\n`sh ./rhel-provision-and-config.sh \u003coptional number of instances\u003e`   \nexamples:  \n  \nJust one ec2 instance (default)  \n`sh ./rhel-provision-and-config.sh`  \n  \nec2 instances  == 3  \n`sh ./rhel-provision-and-config.sh 3`\n\nyou can also unregister the instance from Red Hat Insights and subscription by running the helper \nscript  \n`rhel-deprovision-and-unregister.sh`\n\nthis will also terminate the EC2 instance in AWS\n\nrun `terraform destroy` afterwards if needed\n\n# For RHEL Insight Setup, run these scripts instead\n\nAdditional playbooks have been added to register your EC2 instances with a RHEL subscription\nand add them to Insights inventory:  \n- `rhel-reg-insights.yml`  \n\nUsage:  \n`ansible-playbook -i inventory rhel-reg-insights.yml --vault-id @prompt`  \n  \nNote:  \nvault data set in `vars/reg-data.yml` and must be encrypted with `ansible-vault`\n\n```\nansible-vault edit vars/reg-data.yml\n.\n.\nusername: \u003cRH Subscription Username\u003e\npassword: \u003cRH Subscription Password\u003e\n```\n  \nPlaybook to remove EC2 instances from the Insights inventory and unregister them:  \n- `rhel-unreg-insights.yml`\n\nScripts to provision/deprovision and register/unregister have been created as well:\n- `rhel-provision-and-register.sh`\n- `rhel-deprovision-and-unregister.sh`\n\n# Additional Notes\n\n## How to activate RHEL with your subscription via the command line\n\n### Prerequisites \n- Have a valid Red Hat Subscription\n\n### Steps\n- `sudo subscription-manager register --username \u003cusername\u003e --password \u003cpassword\u003e --auto-attach`\n\n\n## How to register your RHEL system with Red Hat Insights via the command line (RHEL 8.4)\n\n### Prerequisites  \n- Activate your RHEL (see above)\n- [Check Insights on how to add based on version of RHEL](https://console.redhat.com/insights/registration)\n\n### Steps\n- `sudo insights-client --register`\nor\n- `sudo rhc connect -u \u003cusername\u003e -p \u003cpassword\u003e`\n\n## To unregister RHEL system with Insights (decommisioning)\n- `sudo insights-client --unregister`\n\n## To ungregister RHEL system from subscription\n- `sudo subscription-manager unregister`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fdemo-ansible-aap-host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugbiteme%2Fdemo-ansible-aap-host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fdemo-ansible-aap-host/lists"}