Control the alternatives system
{% set my_hadoop_conf = '/opt/hadoop/conf' %}
{{ my_hadoop_conf }}:
file.directory
hadoop-0.20-conf:
alternatives.install:
- name: hadoop-0.20-conf
- link: /etc/hadoop-0.20/conf
- path: {{ my_hadoop_conf }}
- priority: 30
- require:
- file: {{ my_hadoop_conf }}
hadoop-0.20-conf:
alternatives.remove:
- name: hadoop-0.20-conf
- path: {{ my_hadoop_conf }}
Install new alternative for defined <name>
Removes installed alternative for defined <name> and <path> or fallback to default alternative, if some defined before.