diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-01-29 13:36:36 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-02-12 09:52:42 +0000 |
commit | a3c0079de73585e1a6f63acb60cfcec0c21526ca (patch) | |
tree | 757c6c7581effb6c52db28d1088c3723c596fd59 /ansible/roles/trove-setup/tasks/minions.yml | |
parent | 98cf2ab9c80c8efd0df9086353972e7dc73f40b8 (diff) | |
download | trove-setup-baserock/pedroalvarez/systemd-v217-v2.tar.gz |
Changes needed to work with versions of systemd >= v215baserock/pedroalvarez/systemd-v217-v2
Ansible works better with newer versions of sytemd. This workaround
is not needed anymore.
Diffstat (limited to 'ansible/roles/trove-setup/tasks/minions.yml')
-rw-r--r-- | ansible/roles/trove-setup/tasks/minions.yml | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/ansible/roles/trove-setup/tasks/minions.yml b/ansible/roles/trove-setup/tasks/minions.yml index a5b3d8d..451094f 100644 --- a/ansible/roles/trove-setup/tasks/minions.yml +++ b/ansible/roles/trove-setup/tasks/minions.yml @@ -1,20 +1,6 @@ # Depends on: # - lorry-controller-setup.yml --- -# This is a workaround because the service module and the current -# systemd version doesn't work well enough with template units. -# -# It ALWAYS runs `systemctl enable` for all the minions to be -# created, but it only reports that the status of the task has changed -# when in the stderr output is the string "ln -s" (which means the -# unit has been enabled). -- name: Enable as many MINIONS as specified in LORRY_CONTROLLER_MINIONS - shell: systemctl enable lorry-controller-minion@{{ item }}.service +- name: Enable as many MINIONS as are specified in LORRY_CONTROLLER_MINIONS + service: name=lorry-controller-minion@{{ item }} enabled=yes state=started with_sequence: count={{ LORRY_CONTROLLER_MINIONS }} - changed_when: "'ln -s' in minions_creation.stderr" - register: minions_creation - -- name: Start the all the MINIONS created (if any) - service: name=lorry-controller-minion@{{ item.item }} state=restarted - with_items: minions_creation.results - when: item|changed |