---
# tasks file for ansible-role-nhc
#
#
 - name: Check if fgci-release7 is installed
   package: pkg=fgci-release7 state=installed
   register: reg_nhc_fgci7_installed
   check_mode: no
   ignore_errors: True

 - name: Install FGCI repo
   package: pkg=http://idris.fgi.csc.fi/fgci7/x86_64/fgci/rpms/fgci-release7-1-1.el7.noarch.rpm
   when: ansible_distribution_major_version == "7" and reg_nhc_fgci7_installed|failed and nhc_github == False

 - name: Check if lbnl-nhc-nhc_version is installed
   package: pkg=lbnl-nhc-{{ nhc_version }} state=installed
   register: reg_nhc_github_installed
   check_mode: no
   ignore_errors: True
   when: nhc_github

 - name: install NHC from github 
   package: pkg={{ nhc_rpm_url }}
   when: nhc_github and reg_nhc_github_installed|failed

 - name: install NHC from a yum repo
   package: pkg=lbnl-nhc
   when: nhc_github == False

---
# tasks file for ansible-role-nhc
#
#
 - name: Check if fgci-release7 is installed
   package: pkg=fgci-release7 state=installed
   register: reg_nhc_fgci7_installed
   check_mode: no
   ignore_errors: True

 - name: Install FGCI repo
   package: pkg=http://idris.fgi.csc.fi/fgci7/x86_64/fgci/rpms/fgci-release7-1-1.el7.noarch.rpm
   when: ansible_distribution_major_version == "7" and reg_nhc_fgci7_installed is failed and nhc_github == False

 - name: Check if lbnl-nhc-nhc_version is installed
   package: pkg=lbnl-nhc-{{ nhc_version }} state=installed
   register: reg_nhc_github_installed
   check_mode: no
   ignore_errors: True
   when: nhc_github

 - name: install NHC from github 
   package: pkg={{ nhc_rpm_url }}
   when: nhc_github and reg_nhc_github_installed is failed

 - name: install NHC from a yum repo
   package: pkg=lbnl-nhc
   when: nhc_github == False

Change |failed to 'is failed'
Change |failed to 'is failed'
