Commit e6bbdfbb authored by Ophélie Gagnard's avatar Ophélie Gagnard Committed by Ophélie Gagnard

playbook/*ridge*: Add a playbook "ridge".

Goal: Fill a reference database in Wendelin for the OCEAN project.
How: Deploy a script in a Test Suite that scans and upload the desired parts of a KVM filesystem. This is a playbook for the deployment script.

Files: playbook/ridge.yml, playbook/roles/ridge/*

See merge request !163
parent 334ee951
# See roles/ridge/README.md for some context.
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
roles:
- ridge
The Ridge play is part of the OCEAN project. It deploys a script that uploads a scan of the desired directories of a KVM in order to fill a reference database in OCEAN's Wendelin instance. See the OCEAN documentation for more details.
---
dependencies:
- { role: package, package_name: dep--fluent-bit, package_state: latest }
- { role: package, package_name: dep--mca--static, package_state: latest }
# this are not actual dependencies, it is just an experimental list of packages to scan
- { role: package, package_name: dracut-core, package_state: latest }
- { role: package, package_name: dracut, package_state: latest }
- { role: package, package_name: dracut-network, package_state: latest }
- { role: package, package_name: python3, package_state: latest }
- name: Create configuration from template
shell: "sed '{{conf_regex}}' {{mca_path}}/etc/flb.conf.in > {{mca_path}}/etc/flb.conf"
- name: Scan directory
shell: "{{binary}} /sbin {{flb}} {{flb_plugin}} {{flb_conf}} {{log}}"
shell: "{{binary}} /bin {{flb}} {{flb_plugin}} {{flb_conf}} {{log}}"
- name: Indicate success in the logs
shell: "echo -e \"{{sucess_string}}\""
## PACKAGES
mca_name_and_version: dep--mca--static_1-1
fluentbit_name_and_version: dep--fluent-bit_1-1
mca_path: /opt/{{mca_name_and_version}}
flb_path: /opt/{{fluentbit_name_and_version}}
## WENDELIN CONFIGURATION
wendelin_url: "{{ lookup('env', 'ANSIBLE_wendelin_url') }}"
# the deployment is still a WIP but a solution has to be found not to display the password of the production Wendelin instance
wendelin_pwd: "{{ lookup('env', 'ANSIBLE_wendelin_pwd') }}"
wendelin_reference: "{{ lookup('env', 'ANSIBLE_wendelin_reference') }}"
## OTHER
conf_regex: s|%WENDELIN_URL%|{{wendelin_url}}|g;s|%WENDELIN_PWD%|{{wendelin_pwd}}|g;s|%WENDELIN_REFERENCE%|{{wendelin_reference}}|g
binary: "{{mca_path}}/bin/metadata-collect-agent"
flb: "{{flb_path}}/bin/fluent-bit"
flb_plugin: "{{mca_path}}/lib/libfluentbit_wendelin.so"
flb_conf: "{{mca_path}}/etc/flb.conf"
log: /var/log/metadata_collect.log
sucess_string: "\n(success string:) Build successful, connect to:\n"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment