Git Product home page Git Product logo

ansible-role-bareos's Introduction

Bareos

Role to setup BareOS server and clients.

Variables

Server

Note: More options can be seen in defaults/main.yml

  • bareos_install_server - Install packages valid for server (false). Note that this also installs postgresql!
  • bareos_setup_db - Check if postgresql DB bareos exists. If not, create and fill with data (false)
  • bareos_sensu_postgres_pass - Set pass for user sensu to postgresql
  • bareos_director - If you need to override backup director IP address on your client's /etc/hosts
bareos_director:
  ip: 10.0.0.1
  name: backup
  • bareos_clients - List of clients in following format:
bareos_clients:
  - name: some-hostname
    ansible_delegate_hostname: some-hostname
    address: 10.1.1.1
    password: MySuperSecretPassword
    enable_backup_job: true
    state: present                      # optional
    autostart: true                     # optional
    director_ip: 10.0.0.1               # optional
    director_name: backup               # optional
    max_job_bandwidth: 1 mb/s           # optional

NOTES:

  • ansible_delegate_hostname must match inventory_hostname in ansible inventory list. Some tasks will be delegated from backup server to this client
  • enable_backup_job - Will create backup job DefaultJobLinux
  • state - When set to absent, client will be removed from server config (default: present)
  • autostart - Schedule first backup right away (default: true)
  • director_ip - [Optional] Same as bareos_director, just different place to setup
  • director_name - [Optional] Same as bareos_director, just different place to setup

Client

  • bareos_install_client - Install packages for client (false)

Example Playbook

---
- hosts: bareos-client
  become: true
  roles:
    - { name: bareos, tags: bareos }

- hosts: bareos-server
  become: true
  roles:
    - { name: bareos, tags: bareos }

License

GNU GPL

Author Information

Jan Michalek a.k.a. VeselaHouba

ansible-role-bareos's People

Contributors

veselahouba avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ansible-role-bareos's Issues

installing on ubuntu 20

Hi,

I was attempting to use this role to install Bareos on ubuntu 20.04.

I was getting tripped up with the monitoring packages install.

  • name: Install packages for monitoring
    apt:
    name:
    - python-psycopg2
    - python-mysqldb
    - python3-psycopg2
    - python3-mysqldb

Apparently the python 2 versions are not avail on Ubuntu 20. I changed it and added a variable 'bareos_apt_monitoring_packages' which defaults to the list of 4 packages above, but lets me override and remove the python 2 versions.

eg.

  • name: Install packages for monitoring
    apt:
    name: "{{ bareos_apt_monitoring_packages }}"

Does this seem like a reasonable approach? I'm not too experienced with ansible, and just getting started with bareos.

I also added an Ubuntu20.yml file to my vars folder, which was pretty straightforward.

thanks,
Craig

add webui-admin console

What do you think about this as a feature? It would add the webui admin console file if the variable (ie. bareos_webui_admin_console) is set

something like:

bareos_webui_admin_console:
name: admin
password: secret
tlsenable: false

Then the corresponding admin.conf would be created in the console folder. Could use template ansible task to do this iff the variable is present.

I would be happy to implement and submit a PR if you think this would be useful, and open to suggestions if you would like to tweak implementation suggested above.

cheers,
Craig

Cannot provide client side script execution one-liner to exclude files

Hi,

we are trying to use the role to execute a client-side script (one-liner) to exclude files from the backup.

According to the documentation of BareOS, we should be able to define this:

Type:

“\\|command-client”

as so

File = "\|sh -c 'df -l | grep "^/dev/hd[ab]" | grep -v ".*/tmp" | awk "{print \$6}"'"

in the playbook.

But, it does not work. We end up with a list of "File =" containing each of the character in the command.
i.e.

File =
File = |
File = s
File = h
etc ...

Can you tell me if it's a limitation of the role and how can we fix it.

Thanks in advance for your help in the matter.

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.