Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anastasios Lisgaras
GitHubHistory
Commits
ad24ffed
Commit
ad24ffed
authored
Feb 02, 2016
by
Paschalis Korosoglou
Browse files
ARGO-242 Better conditional handling of non egi consumer configurations
parent
33fbe272
Changes
3
Hide whitespace changes
Inline
Side-by-side
roles/consumer/handlers/main.yml
View file @
ad24ffed
...
...
@@ -7,3 +7,8 @@
service
:
name=argo-{{ item.key | lower }}-consumer state=restarted
with_dict
:
tenants
# TODO: Make following handler task tenant unaware
-
name
:
restart all non egi consumers
service
:
name=argo-{{ item.key | lower }}-consumer state=restarted
with_dict
:
tenants
when
:
item.key|lower != "egi"
roles/consumer/tasks/main.yml
View file @
ad24ffed
...
...
@@ -51,21 +51,25 @@
with_dict
:
tenants
notify
:
restart all consumers
-
name
:
Copy out init scripts for consumers
# TODO: Make following task tenant unaware
-
name
:
Copy out init scripts for non egi consumers
tags
:
-
consumer_config
template
:
src=consumer.init.j2
dest=/etc/init.d/argo-{{ item.key | lower }}-consumer
owner=root group=root mode=0755
with_dict
:
tenants
notify
:
restart all consumers
when
:
item.key|lower != "egi"
notify
:
restart all non egi consumers
# TODO: Make following task tenant unaware
-
name
:
Create copies of python wrappers for non egi consumers
tags
:
-
consumer_config
file
:
path=/usr/bin/argo-{{ item.key | lower }}-wrapper-consumer.py
state=link src=/usr/bin/argo-egi-consumer.py
with_dict
:
tenants
when
:
item.key|lower != "egi"
-
name
:
Enable and start consumer services
tags
:
...
...
roles/consumer/templates/consumer.init.j2
View file @
ad24ffed
...
...
@@ -7,7 +7,7 @@
.
/etc/rc.d/init.d/functions
PROG_NAME
=
"argo-{{ item.key | lower }}-consumer"
CONFIG
=
"/etc/argo-{{ item.key | lower }}-consumer/consumer.conf"
DAEMON_PATH
=
"/usr/bin/argo-{{ item.key | lower }}
-wrapper
-consumer.py"
DAEMON_PATH
=
"/usr/bin/argo-{{ item.key | lower }}
{% if item.key|lower != "
egi
" %}-wrapper{% endif %}
-consumer.py"
case
"
$1
"
in
start
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment