Commit 94d04af7 authored by Paschalis Korosoglou's avatar Paschalis Korosoglou
Browse files

Make customer.con file configurable as an Ansible template

parent 5007354b
---
tenants:
- name: "TenantA"
outputdir: "/var/lib/argo-connectors/tenant_a/"
jobs_all: "JOB_TenantA_ALL, JOB_EGI-ROC-Critical, JOB_EGI-ROC-Operators, JOB_EGI-OPS-MONITOR, JOB_EGI-OPS-MONITOR-Critical, JOB_EGI-CLOUDMON, JOB_EGI-CLOUDMON-Critical, JOB_EGI-GLEXEC, JOB_GridPPTest"
jobs_details:
- name: "ALL"
Directory: "TenantA_ALL"
Profiles: "ALL_SERVICES"
TopoType: "GOCDB"
TopoFeed: "https://goc.example.com/gocdbpi/"
TopoFetchType: "Sites"
TopoSelectGroupofEndpoints: "Production:Y, Monitored:Y, Scope:TenantA"
TopoSelectGroupOfGroups: "Certification:Certified, Infrastructure:Production, Scope:TenantA"
DowntimesFeed: "https://goc.example.com/gocdbpi/"
[DEFAULT]
GridPPFeed = http://www-pnp.physics.ox.ac.uk/%7Emohammad/gridpp.feed.xml
[CUSTOMER_EGI]
Name = EGI
OutputDir = /var/lib/argo-connectors/EGI/
Jobs = JOB_EGI-ROC, JOB_EGI-ROC-Critical, JOB_EGI-ROC-Operators, JOB_EGI-OPS-MONITOR, JOB_EGI-OPS-MONITOR-Critical, JOB_EGI-CLOUDMON, JOB_EGI-CLOUDMON-Critical, JOB_EGI-GLEXEC, JOB_GridPPTest
[JOB_EGI-ROC-Critical]
Dirname = EGI_Critical
Profiles = ROC_CRITICAL
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Production:Y, Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Certification:Certified, Infrastructure:Production, Scope:EGI
[JOB_EGI-ROC]
Dirname = EGI_ROC
Profiles = ROC
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Production:Y, Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Certification:Certified, Infrastructure:Production, Scope:EGI
[JOB_EGI-ROC-Operators]
Dirname = EGI_ROC-Operators
Profiles = ROC_OPERATORS
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Production:Y, Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Certification:Certified, Infrastructure:Production, Scope:EGI
[JOB_EGI-OPS-MONITOR-Critical]
Dirname = EGI_OPS-MONITOR-Critical
Profiles = OPS_MONITOR_CRITICAL
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Production:Y, Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Certification:Certified, Infrastructure:Production, Scope:EGI
[JOB_EGI-OPS-MONITOR]
Dirname = EGI_OPS-MONITOR
Profiles = OPS_MONITOR
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Production:Y, Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Certification:Certified, Infrastructure:Production, Scope:EGI
[JOB_EGI-CLOUDMON-Critical]
Dirname = EGI_CLOUDMON_Critical
Profiles = CLOUD-MON_CRITICAL
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Scope:EGI
[JOB_EGI-CLOUDMON]
Dirname = EGI_CLOUDMON
Profiles = CLOUD-MON
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Scope:EGI
[JOB_EGI-GLEXEC]
Dirname = EGI_GLEXEC
Profiles = GLEXEC
TopoType = GOCDB
TopoFetchType = Sites
TopoSelectGroupOfEndpoints = Production:Y, Monitored:Y, Scope:EGI
TopoSelectGroupOfGroups = Certification:Certified, Infrastructure:Production, Scope:EGI
[JOB_GridPPTest]
Dirname = GridPP_Testing
Profiles = TESTING
TopoType = VOFeed
TopoFeed = %(GridPPFeed)s
#TopoSelectGroupOfGroups = Type:OPS_Site
......@@ -31,9 +31,9 @@
tags: ar-packages
yum: name=argo-egi-connectors state=latest enablerepo={{ enabled_argo_repo }}
- name: Configure EGI connectors
- name: Configure connectors
tags: connectors_config
copy: src=customer.conf
template: src=customer.conf.j2
dest=/etc/argo-egi-connectors/customer.conf
owner=root group=root mode=0644
backup=yes
......
{% if tenants is defined %}
{% for tenant in tenants %}
[CUSTOMER_{{tenant.name|upper}}]
Name = {{tenant.name|upper}}
OutputDir = {{tenant.outputdir}}
{% if tenant.jobs_all is defined %}
Jobs = {{ tenant.jobs_all }}
{% endif %}
{% if tenant.jobs_details is defined %}
{% for job in tenant.jobs_details %}
[{{job.name}}]
Dirname = {{job.Directory}}
Profiles = {{job.Profiles}}
TopoType = {{job.TopoType}}
TopoFeed = {{job.TopoFeed}}
TopoFetchType = {{job.TopoFetchType}}
TopoSelectGroupofEndpoints = {{job.TopoSelectGroupofEndpoints}}
TopoSelectGroupOfGroups = {{job.TopoSelectGroupOfGroups}}
DowntimesFeed = {{job.DowntimesFeed}}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
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