Perhaps it would be better to download once and for all the GPG key and store it in the repo?
At least, it seems important to set validate_certs: true.
Perhaps it would be better to download once and for all the GPG key and store it in the repo?
At least, it seems important to set `validate_certs: true`.
I personally don't like this way of partially configuring applications via Ansible.
I strongly prefer a template to deploy the entire grafana.ini file.
I find it much more readable (and more consistent for configuration files in a format that doesn't have a module like ini_file).
Furthermore, it guarantees the totality of the application's behaviour, and avoids having inconsistent configurations.
Nevertheless, I welcome pro-ini_file arguments.
I personally don't like this way of partially configuring applications via Ansible.
I strongly prefer a `template` to deploy the entire `grafana.ini` file.
I find it much more readable (and more consistent for configuration files in a format that doesn't have a module like `ini_file`).
Furthermore, it guarantees the totality of the application's behaviour, and avoids having inconsistent configurations.
Nevertheless, I welcome pro-`ini_file` arguments.
Grafana configuration files evolve fast, it garantees that we are not replacing it with an older version.
Even if the targetted format is not supported by an Ansible module, you can always revert to lineinfile module which is able to replace a line with constraints.
Keeping small changes to the original file garantee better readability during APT upgrades.
Personnaly I hate ini_file and template. I would much rather prefer to not touch the sane defaults and just place an extra file with the configuration that is specific to Aurore. Because Grafana was not packaged by a Debian maintainer, it does not have the usual patch to add a conf.d directory to drop extra configuration.
Taking that into account, I would go for these choice (we need to discuss that):
For well-packaged software, let's just place files in conf.d or site-enabled folders without touching any other files if possible.
For packages that have their configuration moving fast (e.g. Gitlab, Grafana), let's use lineinfile or a specialized equivalent.
For stable packages that does not have .d folders, let's commit the original configuration as a template.
Pro-ini_file arguments:
* Grafana configuration files evolve fast, it garantees that we are not replacing it with an older version.
* Even if the targetted format is not supported by an Ansible module, you can always revert to `lineinfile` module which is able to replace a line with constraints.
* Keeping small changes to the original file garantee better readability during APT upgrades.
Personnaly I hate `ini_file` and `template`. I would much rather prefer to not touch the sane defaults and just place an extra file with the configuration that is specific to Aurore. Because Grafana was not packaged by a Debian maintainer, it does not have the usual patch to add a `conf.d` directory to drop extra configuration.
Taking that into account, I would go for these choice (we need to discuss that):
* For well-packaged software, let's just place files in `conf.d` or `site-enabled` folders without touching any other files if possible.
* For packages that have their configuration moving fast (e.g. Gitlab, Grafana), let's use `lineinfile` or a specialized equivalent.
* For stable packages that does not have `.d` folders, let's commit the original configuration as a template.
@ -0,0 +11,4 @@
apt_key:
url: https://packages.grafana.com/gpg.key
state: present
validate_certs: false
Perhaps it would be better to download once and for all the GPG key and store it in the repo?
At least, it seems important to set
validate_certs: true
.@ -0,0 +30,4 @@
retries: 3
until: apt_result is succeeded
- name: Configure Grafana
I personally don't like this way of partially configuring applications via Ansible.
I strongly prefer a
template
to deploy the entiregrafana.ini
file.I find it much more readable (and more consistent for configuration files in a format that doesn't have a module like
ini_file
).Furthermore, it guarantees the totality of the application's behaviour, and avoids having inconsistent configurations.
Nevertheless, I welcome pro-
ini_file
arguments.Pro-ini_file arguments:
lineinfile
module which is able to replace a line with constraints.Personnaly I hate
ini_file
andtemplate
. I would much rather prefer to not touch the sane defaults and just place an extra file with the configuration that is specific to Aurore. Because Grafana was not packaged by a Debian maintainer, it does not have the usual patch to add aconf.d
directory to drop extra configuration.Taking that into account, I would go for these choice (we need to discuss that):
conf.d
orsite-enabled
folders without touching any other files if possible.lineinfile
or a specialized equivalent..d
folders, let's commit the original configuration as a template.@ -0,0 +94,4 @@
value: "{{ grafana.database.user }}"
- section: database
option: password
value: "{{ grafana.database.password }}"
Where are Grafana logs sent?
It seems to be
/var/log/grafana.log
, when it should be either syslog or journald.It's also in journal, see
sudo journalctl -xe -u grafana-server
. Should I ask grafana to NOT log into/var/log/grafana/grafana.log
?90a6e6acf0
tofdfed1a05a
3 years ago00d63cf082
into master 3 years ago00d63cf082
.