I'm running around in circles I feel. Below is my flattened playbook. 
Ideally the variable is the version of software I want installed. 
Everything else is to determine if the version on a system matches the 
variable or not. The issue is that no matter how I skin this cat the 
version never matches (it should as the version installed on the system I'm 
testing against does match the variable). Thoughts?

---
- name: Install compiled from source git RPMs
  hosts: git_whs_dev
  vars:
    git_version: 2.3.2
  tasks:
    - name: Register git version that is installed on system
      shell: git --version | sed 's/git\ version\ //g'
      register: git_version_output
      tags: register

    - name: Set git_installed_version fact
      set_fact: git_installed_version=git_version_output.stdout_lines
      tags: fact1

    - name: Set git_version fact
      set_fact: desired_git_version="{{ git_version }}"
      tags: fact2

    - name: Message Success if Versions DO NOT Match
      debug: msg="not equal"
      when: git_installed_version != desired_git_version
      tags: dump

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3205a118-0845-44db-878e-42325ff07db7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to