Skip to content
This repository has been archived by the owner on Apr 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #153 from digitalrebar/ansible-playbook-role-when
Browse files Browse the repository at this point in the history
Allow roles in the role map to have when conditions.
  • Loading branch information
galthaus committed Jan 11, 2017
2 parents 790c6e7 + e9a3657 commit edb69a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/rails/app/models/barclamp_rebar/ansible_playbook_jig.rb
Expand Up @@ -240,7 +240,11 @@ def run(nr,data)
end
f.write(" roles:\n")
role_role_map[nr.role.name].each do |rname|
f.write(" - #{rname}\n")
if rname.is_a?(String)
f.write(" - #{rname}\n")
else
f.write(" - { role: \"#{rname["role"]}\", when: \"#{rname["when"]}\" }\n")
end
end
end
else
Expand Down

0 comments on commit edb69a3

Please sign in to comment.