damhau.infoblox

Infoblox

Rôle pour utiliser l'API Rest d'Infoblox.

Exigences

Accès à l'API Rest d'Infoblox

Variables du rôle

  • Des valeurs par défaut sont configurées dans defaults/main.yml pour les variables suivantes :

    • infoblox_url (l'URL de l'appareil Infoblox)
    • infoblox_action (l'action de l'API Rest peut être : créer, supprimer, lire, mettre à jour)
    • infoblox_recordtype (le type d'enregistrement Infoblox peut être : a, ptr, host, cname)
    • infoblox_view (la vue Infoblox)
  • Variables pour les identifiants Infoblox :

    • infoblox_username
    • infoblox_password
  • Variables pour les champs dans la demande API, les champs sont documentés dans
    https://www.infoblox.com/wp-content/uploads/infoblox-deployment-infoblox-rest-api.pdf Le nom du champ est précédé de infoblox_

    • infoblox_ipv4addr
    • infoblox_comment
    • infoblox_canonical
    • infoblox_name

Comment exécuter les tests

Cd dans tests/roles
ln -s ../../../infoblox/ damhau.infoblox
cd dans tests
ansible-playbook -i inventory test.yml -t a (vous pouvez choisir a, cname, ptr, host)

Exemple de Playbook

- hosts: localhost
  connection: local
  gather_facts: false
  vars:
    infoblox_username: 'utilisateur'
    infoblox_password: 'motdepasse'
    infoblox_hostname: 'infobloxfqdn'
    infoblox_view: 'par défaut'
  tasks:
  - include_role:
       name: damhau.infoblox
    vars:
      infoblox_name: 'nouveauhôte.dhconsulting.ch'
      infoblox_ipv4addr: '1.1.1.1'
      infoblox_recordtype: 'host'
      infoblox_action: 'create'

  - include_role:
       name: damhau.infoblox
    vars:
      infoblox_name: 'nouveauhôte.dhconsulting.ch'
      infoblox_recordtype: 'host'
      infoblox_action: 'delete'

Licence

BSD

À propos du projet

Role to consume Infoblox Rest API

Installer
ansible-galaxy install damhau.infoblox
Licence
Unknown
Téléchargements
88
Propriétaire