diff --git a/states/java/install.sls b/states/java/install.sls index cf8b446..3a8f6f0 100644 --- a/states/java/install.sls +++ b/states/java/install.sls @@ -41,5 +41,7 @@ java-update-alternatives-script: java-default: cmd.run: - name: {{ java.install_dir }}/default/update-alternatives-java.sh + - stateful: True - require: - archive: java-extract + - file: java-update-alternatives-script diff --git a/states/java/templates/update-alternatives-java.sh.j2 b/states/java/templates/update-alternatives-java.sh.j2 index 6f0e72f..3a4a84b 100644 --- a/states/java/templates/update-alternatives-java.sh.j2 +++ b/states/java/templates/update-alternatives-java.sh.j2 @@ -5,3 +5,4 @@ do update-alternatives --install /usr/bin/${item} ${item} {{ java.install_dir }}/default/bin/${item} 1 update-alternatives --set ${item} {{ java.install_dir }}/default/bin/${item} done +echo "changed=no comment='java alternatives up to date' whatever=123"