Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

The alternatives module is erroneously reporting "changed" status. #12

@yeroc

Description

@yeroc
Issue Type:

Bug Report

Ansible Version:

ansible 1.8 (devel ba46930) last updated 2014/08/06 15:37:06 (GMT -600)

Environment:

CentOS 6

Summary:

The alternatives module is reporting "changed" status when re-running a task that has already been successfully applied.

Steps To Reproduce:

Given a play:


---
- hosts: all
  sudo: yes
  vars:
    jdk_dir: /usr/java/jdk1.7.0_55

  tasks:
  - name: Configure Java alternatives
    alternatives: name={{ item.name }} link={{ item.link }} path={{ item.path }}
    with_items:
    - { name: jar, link: /usr/bin/jar, path: "{{ jdk_dir }}/bin/jar" }
    - { name: jps, link: /usr/bin/jps, path: "{{ jdk_dir }}/bin/jps" }
    - { name: java, link: /usr/bin/java, path: "{{ jdk_dir }}/bin/java" }
    - { name: jmap, link: /usr/bin/jmap, path: "{{ jdk_dir }}/bin/jmap" }
    - { name: javac, link: /usr/bin/javac, path: "{{ jdk_dir }}/bin/javac" }
    - { name: javaws, link: /usr/bin/javaws, path: "{{ jdk_dir }}/bin/javaws" }
    - { name: jstack, link: /usr/bin/jstack, path: "{{ jdk_dir }}/bin/jstack" }
    - { name: jvisualvm, link: /usr/bin/jvisualvm, path: "{{ jdk_dir }}/bin/jvisualvm" }
Expected Results:

The first time the task is run the status is "changed" as expected. We expect subsequent runs with the identical path specified to indicate an "ok" status.

Actual Results:

When running the task subsequently the status is actually reporting "changed".

Note: This ticket was previously reported as ansible #8613.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions