Added support for the urls with authentication by adding personal access token variables.

This feature is available for the resources `plug_sge_script`, `plug_smartoverall_script` and `plug_smart_script`

Work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=4078]
This commit is contained in:
Guillaume Raffy 2025-05-23 11:35:43 +02:00
parent 202ada89cd
commit 71c9541203
4 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,9 @@
## v2.3.1
### Enhancements
* Added support for the urls with authentication by adding personal access token variables. This feature is available for the resources `plug_sge_script`, `plug_smartoverall_script` and `plug_smart_script`. work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=4078]
## v2.3.0 ## v2.3.0
### Enhancements ### Enhancements

View File

@ -163,6 +163,7 @@ SGE jobs and host.
* **xymon_cli__plug_sge_script_path**: Path to the `sge` script [default: `'/usr/lib/xymon/client/ext/sge'`]. * **xymon_cli__plug_sge_script_path**: Path to the `sge` script [default: `'/usr/lib/xymon/client/ext/sge'`].
* **xymon_cli__plug_sge_script_tpl**: Template used to generate the previous script [default: `'usr/lib/xymon/client/ext/sge.j2'`]. * **xymon_cli__plug_sge_script_tpl**: Template used to generate the previous script [default: `'usr/lib/xymon/client/ext/sge.j2'`].
* **xymon_cli__plug_sge_script_url**: Use a remote file to get the previous script instead of a template [default: `''`]. * **xymon_cli__plug_sge_script_url**: Use a remote file to get the previous script instead of a template [default: `''`].
* **xymon_cli__plug_sge_script_pat**: personal access token to use with xymon_cli__plug_sge_script_url [default: `''`].
* **xymon_cli__plug_sge_path**: Configuration file for the `sge` plugin [default: `'/etc/xymon/clientlaunch.d/sge.cfg'`]. * **xymon_cli__plug_sge_path**: Configuration file for the `sge` plugin [default: `'/etc/xymon/clientlaunch.d/sge.cfg'`].
* **xymon_cli__plug_sge_tpl**: Template used to generate the previous config file [default: `'etc/xymon/clientlaunch.d/sge.cfg.j2'`]. * **xymon_cli__plug_sge_tpl**: Template used to generate the previous config file [default: `'etc/xymon/clientlaunch.d/sge.cfg.j2'`].
* **xymon_cli__plug_sge_interval**: Time between each run of the `sge` plugin [default: `'10m'`] * **xymon_cli__plug_sge_interval**: Time between each run of the `sge` plugin [default: `'10m'`]
@ -180,6 +181,7 @@ For more features, see the next Smart plugin.
* **xymon_cli__plug_smartoverall_script_path**: Path to the `smartoverall` script [default: `'/usr/lib/xymon/client/ext/smartoverall'`]. * **xymon_cli__plug_smartoverall_script_path**: Path to the `smartoverall` script [default: `'/usr/lib/xymon/client/ext/smartoverall'`].
* **xymon_cli__plug_smartoverall_script_tpl**: Template used to generate the previous script [default: `'usr/lib/xymon/client/ext/smartoverall.j2'`]. * **xymon_cli__plug_smartoverall_script_tpl**: Template used to generate the previous script [default: `'usr/lib/xymon/client/ext/smartoverall.j2'`].
* **xymon_cli__plug_smartoverall_script_url**: Use a remote file to get the previous script instead of a template [default: `''`]. * **xymon_cli__plug_smartoverall_script_url**: Use a remote file to get the previous script instead of a template [default: `''`].
* **xymon_cli__plug_smartoverall_script_pat**: personal access token to use with xymon_cli__plug_smartoverall_script_url [default: `''`].
* **xymon_cli__plug_smartoverall_path**: Configuration file for the `smartoverall` plugin [default: `'/etc/xymon/clientlaunch.d/smartoverall.cfg'`]. * **xymon_cli__plug_smartoverall_path**: Configuration file for the `smartoverall` plugin [default: `'/etc/xymon/clientlaunch.d/smartoverall.cfg'`].
* **xymon_cli__plug_smartoverall_tpl**: Template used to generate the previous config file [default: `'etc/xymon/clientlaunch.d/smartoverall.cfg.j2'`]. * **xymon_cli__plug_smartoverall_tpl**: Template used to generate the previous config file [default: `'etc/xymon/clientlaunch.d/smartoverall.cfg.j2'`].
* **xymon_cli__plug_smartoverall_interval**: Time between each run of the `smartoverall` plugin [default: `'10m'`] * **xymon_cli__plug_smartoverall_interval**: Time between each run of the `smartoverall` plugin [default: `'10m'`]
@ -195,6 +197,7 @@ one's recommended by the vendor and check a recent (<24h) test was done.
* **xymon_cli__plug_smart_script_path**: Path to the `smart` script [default: `'/usr/lib/xymon/client/ext/smart'`]. * **xymon_cli__plug_smart_script_path**: Path to the `smart` script [default: `'/usr/lib/xymon/client/ext/smart'`].
* **xymon_cli__plug_smart_script_tpl**: Template used to generate the previous script [default: `'usr/lib/xymon/client/ext/smart.j2'`]. * **xymon_cli__plug_smart_script_tpl**: Template used to generate the previous script [default: `'usr/lib/xymon/client/ext/smart.j2'`].
* **xymon_cli__plug_smart_script_url**: Use a remote file to get the previous script instead of a template [default: `''`]. * **xymon_cli__plug_smart_script_url**: Use a remote file to get the previous script instead of a template [default: `''`].
* **xymon_cli__plug_smart_script_pat**: personal access token to use with xymon_cli__plug_smart_script_url [default: `''`].
* **xymon_cli__plug_smart_path**: Configuration file for the `smart` plugin [default: `'/etc/xymon/clientlaunch.d/smart.cfg'`]. * **xymon_cli__plug_smart_path**: Configuration file for the `smart` plugin [default: `'/etc/xymon/clientlaunch.d/smart.cfg'`].
* **xymon_cli__plug_smart_tpl**: Template used to generate the previous config file [default: `'etc/xymon/clientlaunch.d/smart.cfg.j2'`]. * **xymon_cli__plug_smart_tpl**: Template used to generate the previous config file [default: `'etc/xymon/clientlaunch.d/smart.cfg.j2'`].
* **xymon_cli__plug_smart_interval**: Time between each run of the `smart` plugin [default: `'10m'`] * **xymon_cli__plug_smart_interval**: Time between each run of the `smart` plugin [default: `'10m'`]

View File

@ -166,6 +166,7 @@ xymon_cli__plug_sge_state: False
xymon_cli__plug_sge_script_path: '/usr/lib/xymon/client/ext/sge.sh' xymon_cli__plug_sge_script_path: '/usr/lib/xymon/client/ext/sge.sh'
xymon_cli__plug_sge_script_tpl: 'usr/lib/xymon/client/ext/sge.sh.j2' xymon_cli__plug_sge_script_tpl: 'usr/lib/xymon/client/ext/sge.sh.j2'
xymon_cli__plug_sge_script_url: '' xymon_cli__plug_sge_script_url: ''
xymon_cli__plug_sge_script_pat: ''
xymon_cli__plug_sge_path: '/etc/xymon/clientlaunch.d/sge.cfg' xymon_cli__plug_sge_path: '/etc/xymon/clientlaunch.d/sge.cfg'
xymon_cli__plug_sge_tpl: 'etc/xymon/clientlaunch.d/sge.cfg.j2' xymon_cli__plug_sge_tpl: 'etc/xymon/clientlaunch.d/sge.cfg.j2'
xymon_cli__plug_sge_interval: '5m' xymon_cli__plug_sge_interval: '5m'
@ -180,6 +181,7 @@ xymon_cli__plug_smartoverall_package: [ 'smartmontools' ]
xymon_cli__plug_smartoverall_script_path: '/usr/lib/xymon/client/ext/smartoverall' xymon_cli__plug_smartoverall_script_path: '/usr/lib/xymon/client/ext/smartoverall'
xymon_cli__plug_smartoverall_script_tpl: 'usr/lib/xymon/client/ext/smartoverall.j2' xymon_cli__plug_smartoverall_script_tpl: 'usr/lib/xymon/client/ext/smartoverall.j2'
xymon_cli__plug_smartoverall_script_url: '' xymon_cli__plug_smartoverall_script_url: ''
xymon_cli__plug_smartoverall_script_pat: ''
xymon_cli__plug_smartoverall_path: '/etc/xymon/clientlaunch.d/smartoverall.cfg' xymon_cli__plug_smartoverall_path: '/etc/xymon/clientlaunch.d/smartoverall.cfg'
xymon_cli__plug_smartoverall_tpl: 'etc/xymon/clientlaunch.d/smartoverall.cfg.j2' xymon_cli__plug_smartoverall_tpl: 'etc/xymon/clientlaunch.d/smartoverall.cfg.j2'
xymon_cli__plug_smartoverall_interval: '10m' xymon_cli__plug_smartoverall_interval: '10m'
@ -192,6 +194,7 @@ xymon_cli__plug_smart_package: [ 'smartmontools' ]
xymon_cli__plug_smart_script_path: '/usr/lib/xymon/client/ext/smart' xymon_cli__plug_smart_script_path: '/usr/lib/xymon/client/ext/smart'
xymon_cli__plug_smart_script_tpl: 'usr/lib/xymon/client/ext/smart.j2' xymon_cli__plug_smart_script_tpl: 'usr/lib/xymon/client/ext/smart.j2'
xymon_cli__plug_smart_script_url: '' xymon_cli__plug_smart_script_url: ''
xymon_cli__plug_smart_script_pat: ''
xymon_cli__plug_smart_path: '/etc/xymon/clientlaunch.d/smart.cfg' xymon_cli__plug_smart_path: '/etc/xymon/clientlaunch.d/smart.cfg'
xymon_cli__plug_smart_tpl: 'etc/xymon/clientlaunch.d/smart.cfg.j2' xymon_cli__plug_smart_tpl: 'etc/xymon/clientlaunch.d/smart.cfg.j2'
xymon_cli__plug_smart_interval: '10m' xymon_cli__plug_smart_interval: '10m'

View File

@ -139,6 +139,9 @@
ansible.builtin.get_url: ansible.builtin.get_url:
url: '{{ xymon_cli__plug_sge_script_url }}' url: '{{ xymon_cli__plug_sge_script_url }}'
dest: '{{ xymon_cli__plug_sge_script_path }}' dest: '{{ xymon_cli__plug_sge_script_path }}'
headers:
Content-Type: application/json
Authorization: 'Bearer {{ xymon_cli__plug_sge_script_pat }}'
owner: root owner: root
group: xymon group: xymon
mode: 0755 mode: 0755
@ -164,6 +167,9 @@
ansible.builtin.get_url: ansible.builtin.get_url:
url: '{{ xymon_cli__plug_smartoverall_script_url }}' url: '{{ xymon_cli__plug_smartoverall_script_url }}'
dest: '{{ xymon_cli__plug_smartoverall_script_path }}' dest: '{{ xymon_cli__plug_smartoverall_script_path }}'
headers:
Content-Type: application/json
Authorization: 'Bearer {{ xymon_cli__plug_smartoverall_script_pat }}'
owner: root owner: root
group: xymon group: xymon
mode: 0755 mode: 0755
@ -189,6 +195,9 @@
ansible.builtin.get_url: ansible.builtin.get_url:
url: '{{ xymon_cli__plug_smart_script_url }}' url: '{{ xymon_cli__plug_smart_script_url }}'
dest: '{{ xymon_cli__plug_smart_script_path }}' dest: '{{ xymon_cli__plug_smart_script_path }}'
headers:
Content-Type: application/json
Authorization: 'Bearer {{ xymon_cli__plug_smart_script_pat }}'
owner: root owner: root
group: xymon group: xymon
mode: 0755 mode: 0755