Coder Social home page Coder Social logo

ansible-role-backup_config's Introduction

Ansible Role: Backup Config

Role to collect the current device configurations and store it on the Ansible controller with a user specific backup filename and path.

Requirements

None.

Role Variables

Available variables are listed below. For their default values, see defaults/main.yml:

provider_server: localhost
provider_server_port: 443
provider_user: admin
provider_password: secret
provider_validate_certs: no
provider_transport: rest
provider_timeout: 120

Establishes initial connection to your BIG-IQ. These values are substituted into your provider module parameter.

filename

Specifies the filename to store configurations. Since this role backs up multiple files, the multiple files created will be named the value specified here, however the extensions will differ for the backed up files. For example, if filename is "backup", this role will create backup.qkview and backup.ucs.

path

Absolute or relative path of folder where config will be stored.

backup

Boolean flag to indicate if we need to backup configurations before overwriting it with new configurations.

Dependencies

None.

Example Playbook

- name: Backup config
  hosts: bigip
  vars:
    backup_config:
      filename: "config_{{ ansible_host }}"
      path: "~/network_configs_1/"
      backup: yes
  roles:
    - { role: f5devcentral.backup_config }

License

Apache

Author Information

This role was created in 2018 by Tim Rupp, with the help of Forrest Crenshaw.

ansible-role-backup_config's People

Contributors

caphrim007 avatar wojtek0806 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-backup_config's Issues

Getting this to work

I tried to get this to work with my playbook below

---
- name: Fetch a backup from the remote device
  hosts: F5
  roles:
   - { role: f5devcentral.backup_config }
  tasks:
  - name: Backup
    backup_config:
      backup: yes
      path: "~/F5/"
      filename: "config_{{ inventory_hostname }}"
      provider:
        server: "{{ inventory_hostname }}"
        server_port: 443
        user: ansible
        password: ansible
        validate_certs: no
    delegate_to: localhost

But it fails with:
ERROR! couldn't resolve module/action 'backup_config'. This often indicates a misspelling, missing collection, or incorrect module path.

I installed the module with:
ansible-galaxy install f5devcentral.backup_config

So I must be missing out on how to refer to the installed code. And it may be bause I am relative new to ansible and am still trying to get my head around the whole concept. So things I understand but other just don't connect in my head regardless of how many times I read the ansible documentation.

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.