Git Product home page Git Product logo

ansible.snmp's Introduction

Ansible Role: SNMP

Build Status license Ansible Galaxy Ansible Role

Description

Ansible role for installing and Configuration SNMP v3 on installs RHEL/CentOS or Debian/Ubuntu and SNMP v2 on Windows.

Installation

ansible-galaxy install sbaerlocher.snmp

Requirements

Role Variables

Variable Default Comments (type)
snmp_user snmp SNMP User
snmp_password snmp_password SNMP Password
snmp_encryption snmp_encryption SNMP Encryption
snmp_contact Optional: System Contact
snmp_location Optional: System Location
snmp_agentadress_protocol.ipvX udp / udp6 Optional: SNMP Protocol, X for ipv4 or ipv6
snmp_agentadress_adress.ipvX {{ ansible_default_ipv4.address }} / {{ ansible_default_ipv6.address }} Optional: SNMP bind address, X for ipv4 or ipv6
snmp_agentadress_port.ipvX 161 / 161 Optional: SNMP port, X for ipv4 or ipv6

Dependencies

None

Example Playbook

- hosts: all
  roles:
    - sbaerlocher.snmp

Changelog

1.8.0

  • add snmp install via module

1.7.1

  • add support for Windows 1809

1.7.0

  • add osupdate support
  • syntax cleaned up

1.6.0

  • add distro support
  • syntax cleaned up
  • proxmox support

1.5

  • add Windows Support

1.4

  • add IP bind support

1.3

  • add become support
  • new role check
  • support for sysContact and sysLocation

1.2

  • add package manager for generic OS
  • cleanup

1.1

  • add ArchLinux support

1.0

  • Initial release

Author

License

This project is under the MIT License. See the LICENSE file for the full license text.

Copyright

(c) 2018, Simon Bärlocher

ansible.snmp's People

Contributors

aletor93 avatar sbaerlocher avatar tyneven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible.snmp's Issues

Replace hard-coded algorithms with variables

Hi,
I noticed that there is no current way to override the default algorithms with a variable. In the config template, they are hard coded to SHA and AES.

createUser {{ snmp_user }} SHA {{ snmp_password }} AES {{ snmp_encryption }}

These values should be replaced with variables in order to have the ability to substitute them with more or less secure options depending on needs.

The error was: ansible.errors.AnsibleUndefinedVariable: 'snmp_agentadress_protocol' is undefined

Playbook:

- hosts: host
  gather_facts: yes
  tasks:
    - name: snmp
      import_role: 
        name: sbaerlocher.snmp
      tags: [ configuration, packages ]
      vars:
        snmp_user: "{{ group_vars_snmp_secrets.snmp_user }}"
        snmp_password: "{{ group_vars_snmp_secrets.snmp_password }}"
        snmp_encryption: "{{ group_vars_snmp_secrets.snmp_encryption }}"`

Result:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'snmp_agentadress_protocol' is undefined
fatal: [host]: FAILED! => {
    "changed": false
}

MSG:

AnsibleUndefinedVariable: 'snmp_agentadress_protocol' is undefined

IPv6 address needs brackets

Hi,

In the snmpd.conf.j2 file for linux, the IPv6 address should be encased in brackets to make this work properly.

Regards,
Tim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.