GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - russomi-labs/vm-snmp-lab: Setup and configure SNMP

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
inventory
inventory
 
 
roles
roles
 
 
.ansible-lint
.ansible-lint
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
Vagrantfile
Vagrantfile
 
 
Vagrantfile.yml
Vagrantfile.yml
 
 
ansible.cfg
ansible.cfg
 
 
playbook.yml
playbook.yml
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

vm-snmp-lab

Setup and Configure SNMP

  • Getting Started
    • Create .env file
    • Configure VMs
    • Starting and Stopping the VM
    • Downloading dependencies
    • Testing inventory with ad-hoc commands
    • Running the Ansible Playbook
  • Sample directory layout
  • Resources

Getting Started

Create .env file

  1. Copy .env.example as .env
  2. Add/Update environment variables as needed
  3. source .env to load variables into the current session

Configure VMs

Update Vagrantfile.yml to configure the VMs that will be created.

Starting and Stopping the VM

# bring the VM up
vagrant up

# connect via ssh
vagrant ssh vagrant01

# stop the vm
vagrant halt

# delete the vm
vagrant destroy

Downloading dependencies

Download the role and collection dependencies:

cd roles
ansible-galaxy role install -r requirements.yml
ansible-galaxy collection install -r requirements.yml

# if you want to install locally
# ansible-galaxy role install --roles-path . -r requirements.yml

Testing inventory with ad-hoc commands

ansible vagrant -a "date"

Running the Ansible Playbook

To execute the playbook to configure the VM execute the following:

# run the playbook against a specific vm
ansible-playbook playbook.yml # --limit vagrant01

Sample directory layout

production                # inventory file for production servers
staging                   # inventory file for staging environment

group_vars/
   group1.yml             # here we assign variables to particular groups
   group2.yml
host_vars/
   hostname1.yml          # here we assign variables to particular systems
   hostname2.yml

library/                  # if any custom modules, put them here (optional)
module_utils/             # if any custom module_utils to support modules, put them here (optional)
filter_plugins/           # if any custom filter plugins, put them here (optional)

site.yml                  # main playbook
webservers.yml            # playbook for webserver tier
dbservers.yml             # playbook for dbserver tier
tasks/                    # task files included from playbooks
    webservers-extra.yml  # <-- avoids confusing playbook with task files

Resources

  • https://github.com/sbaerlocher/ansible.snmp
  • https://access.redhat.com/solutions/17815
  • https://access.redhat.com/solutions/341073
  • https://access.redhat.com/solutions/30119
  • https://access.redhat.com/solutions/1130063
  • https://access.redhat.com/solutions/3848721
  • https://access.redhat.com/solutions/273513
  • https://www.ansible.com/blog/announcing-the-red-hat-enterprise-linux-certified-ansible-collection
  • https://galaxy.ansible.com/ui/repo/published/fedora/linux_system_roles/
  • https://github.com/linux-system-roles/
  • Ansible User Guide
  • Introduction to Ansible for Linux System Roles
  • linux-system-roles
  • Vagrant Advanced Examples
  • Ansible tips and tricks | Sample Ansible setup | Sample directory layout
  • Red Hat Enterprise Linux (RHEL) System Roles
  • Ways to check for open ports on RHEL

About

Setup and configure SNMP

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

Generated from russomi-labs/ansible-vm-lab
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.