Comments (5)
@gardar any thoughts on this?
from grafana-ansible-collection.
As a second option to this, I would love an example of how one might include this role in another playbook and skip the grafana_install stages. I cannot for the life of me figure out how this is possible.
If invoked with --skip-tags "grafana_install", it also skips all of the preflight,configure,dashboard tasks, etc.
If invoked with the reverse of --tags "grafana_preflight,grafana_configure,grafana_dashboard", it still doesn't run the "include_task" tasks, because those themselves are not tagged - they only tag their included tasks if they are first run.
If invoked in this same way but where I also do an args: apply: tags: grafana_configure, then it will add the "grafana_configure" tag to all included tasks - and run all of them - even the ones I intended to skip.
EDIT: Naturally I would figure it out the second I got frustrated enough to post here. The missing ingredient was "untagged". The command:
ansible-playbook -i inventories/hosts playbooks/my_specific_grafana_install.yml --tags "grafana_preflight,grafana_configure,grafana_datasources,grafana_notifications,grafana_dashboards,untagged"
And in my playbook something like this:
- hosts: server
collections:- grafana.grafana
tasks: - import_role:
name: grafana.grafana.grafana
- grafana.grafana
from grafana-ansible-collection.
Apologies for the late reply but glad you were able to make it work
Ill see if I can add this an example
from grafana-ansible-collection.
The feature request is still valid. This is an extremely annoying workaround, since it doesn't play nicely with running my playbook from within another playbook (do_site.yml that calls install_grafana, which installs grafana in my own way and then calls the official role). My ansible-playbook command will have to define all tags that I have to use for all roles that I include, otherwise it will silently skip those. It would be much better if Grafana's ansible role simply contained a way to provide your own install / offline support.
from grafana-ansible-collection.
Hey @j-karls, Do you want to raise a PR for your proposed changes?
from grafana-ansible-collection.
Related Issues (20)
- Local dashboards are not provisioned because of check_mode HOT 1
- Destination directory /etc/grafana/provisioning/notification does not exist
- Error on dashboard rollout HOT 1
- Grafana Datasource - wrong parameter name for community.grafana.grafana_datasource HOT 2
- Grafana Agent role can not run in check mode
- Improve support and documentation for Grafana Agent Flow mode HOT 3
- Service start failed in Flow mode HOT 4
- grafana_url unsupported in grafana.grafana.datasource module HOT 2
- Implement templating of grafana_agent_provisioned_config_file HOT 1
- Grafana Agent - Final check
- Grafana Agent - Repo Install HOT 3
- Add support for ansible-playbook serial > 1 (manage multiple hosts at a time)
- Ansible Role to support Agent installation on MacOS
- Ansible Role to support Agent installation on Windows
- apt_key is deprecated HOT 4
- Using 'grafana_dashboards_dir' not working anymore
- Provisioning errors in YAML
- Outdated APT setup steps for grafana role
- grafana agent role doesn't fail if version number cannot be obtained from github HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-ansible-collection.