Fix github_issue test and enable in CI.

This commit is contained in:
Matt Clay 2017-09-01 13:59:57 -07:00
parent 6e79dfb5f3
commit a7d5492ea3
9 changed files with 27 additions and 4 deletions

View file

@ -1 +1,2 @@
destructive
posix/ci/group1

View file

@ -0,0 +1,3 @@
- name: install py27-requests to avoid install via pip later
package:
name: py27-requests

View file

@ -0,0 +1 @@
# nothing to do here, allow requests to be installed by pip later

View file

@ -0,0 +1,3 @@
- name: install python-requests to avoid install via pip later
package:
name: python-requests

View file

@ -0,0 +1,3 @@
- name: install python3-requests to avoid install via pip later
package:
name: python3-requests

View file

@ -17,6 +17,11 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
- name: make sure github3.py is not installed
pip:
name: github3.py
state: absent
# Testcase 0001: Check if dependency is installed
- name: Check if github3.py is installed or not
github_issue:
@ -33,10 +38,17 @@
- "{{ lib_missing.changed == False }}"
- "{{ 'Missing required github3 module.' in lib_missing.msg }}"
- include: '{{ item }}'
with_first_found:
- files:
- '{{ ansible_distribution }}-{{ ansible_distribution_version }}-python{{ ansible_python_version.split(".")[0] }}.yml'
- '{{ ansible_distribution }}-python{{ ansible_python_version.split(".")[0] }}.yml'
- '{{ ansible_os_family }}-python{{ ansible_python_version.split(".")[0] }}.yml'
- 'default-python{{ ansible_python_version.split(".")[0] }}.yml'
- name: make sure github3.py is installed
pip:
name: github3.py
state: latest
# Testcase 0002: Check if issue exists
- name: Check if GitHub issue is closed or not