Closed sagagliardo closed 6 years ago
Python 2.6 has some bugs with the functionality of lists and Ansible for some reason. When I bumped up Travis to 2.7 this was no longer an issue.
@naftulikay Anything else I need to address here before we get this bad boy merged?
I'm not entirely certain that this is even needed. Can you detail an exact use-case which this solves for?
Looks like whatever it was being blocked by that was 2.7 specific is resolved, possibly by changes on your end? Passing now.
@naftulikay any update getting this merged?
I'm not entirely certain that this is even needed. Can you detail an exact use-case which this solves for?
If this is a bug in Ansible, then I don't see an urgency in fixing it in all downstream roles.
@sagagliardo Now that the refactor is complete, I do not see the need for this PR anymore, please see latest master and #6.
There are three variables now that control file and directory copying:
goss_file: goss.yml
goss_addtl_files: []
goss_addtl_dirs: []
These are their defaults. This is how they are used:
- name: deploy test files
copy: src={{ item }} dest={{ degoss_test_root }}
with_items: "{{ [goss_file] + goss_addtl_files + goss_addtl_dirs }}"
changed_when: degoss_changed_when
Per https://github.com/ansible/ansible/issues/17136 , file glob has known issues in Ansible 2.2.0+ at the moment. Until this is resolved, I'm suggesting this PR to resolve this issue as an alternative to file glob.
Tests can be specified as either a single file or a path as an element in the tests array as well, as was previous behavior. The only change is that tests are now specified as an array vs a single string.