Skip to content

Instantly share code, notes, and snippets.

@cywf
Created July 18, 2023 16:50
Show Gist options
  • Save cywf/c842055e90410ee7ff3876e2fbc9acbd to your computer and use it in GitHub Desktop.
Save cywf/c842055e90410ee7ff3876e2fbc9acbd to your computer and use it in GitHub Desktop.
Exploring Red Hat Satellite 6.13 & Ansible: Setting Up Your Sandbox

Hello fellow tech enthusiasts,

While navigating the endlessly vast seas of tech, I recently found myself on the shores of Red Hat Satellite 6.13 and Ansible. Rather than just dipping my toes in, I dove head-first and boy, am I enjoying the swim! These platforms are not just cool to work with but are also key players in the DevOps game.

So, enough with the chatter! Let's get our hands dirty and create a test environment. By the end of this guide, you will have a fully-functioning sandbox to test and play with Red Hat Satellite and Ansible.

First off, we need to install Red Hat Satellite. I'm using a RHEL 7 server. Remember to replace satellite.example.com with your actual hostname. (And if you're wondering why I'm not using RHEL 8, well, it's a story for another time!)

# Update your system first
yum update -y

# Install the Satellite Server
yum localinstall -y http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm

# Register and subscribe to Satellite Server
subscription-manager register --org="Your_Org" --activationkey="Your_Activation_Key"

# Run the Satellite Installer
satellite-installer --scenario satellite \
  --foreman-initial-organization "Your_Org" \
  --foreman-initial-location "Your_Location" \
  --foreman-admin-username admin \
  --foreman-admin-password changeme

Voila, your Satellite server is up and running!

Now, it's Ansible's turn. We'll set up a control node. You know, to puppeteer our managed nodes (in the friendliest way possible, of course).

# Install Ansible on RHEL
yum install ansible -y

# Let's check the installation
ansible --version
Great! With that sorted, let's create an Ansible playbook. You can create a simple playbook or a complex multi-tier application, but here's a simple example to get you started:

```yaml
---
- name: Ansible Playbook Example
  hosts: localhost
  tasks:
  - name: Ensure apache is at the latest version
    yum:
      name: httpd
      state: latest

Save this playbook as playbook.yml and run it with:

ansible-playbook playbook.yml

And there you go, folks! You've just set up your own playground for Red Hat Satellite 6.13 and Ansible. I encourage you to explore and experiment. Remember, a developer's best trait is curiosity.

Now, go ahead, run wild in your new sandbox, and build something fantastic. I'll be here, writing about my next tech adventure! And as always, if you're stuck, don't hesitate to drop a comment. After all, we're in this together!

Signing off for now,

cywf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment