1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/net_command/tasks/main.yml
John R Barker 64432c8f7c WIP: net_command: Initial tests for VyOS (#20147)
* Conditional include on ansible_network_os

* copy & paste error

* More tests

* More tests

* junos tests (based on vyos)

* remove excessive whitespace

* Pass in ansible_network_os

* net_command for ios

* consistent debug

* wrapp line

* ansible-test changes made in another PR

* ansible-test changes made in another PR
2017-01-17 11:06:34 +00:00

46 lines
1.5 KiB
YAML

---
# Test code for the net_command module.
# (c) 2017, Red Hat
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# This is a placeholder test, will be fleshed out by gundalow at a later point
# Check if ansible_network_os being undef or incorrect
# Without this we wouldn't run any tests, and not actually test Ansible
# FIXME One we can get ansible_network_os from env remove it from
# test/runner/johnb@x260:~/git/ansible-inc/ansible/test/runner/lib/executor.py
#
- name: Check for acceptable ansible_network_os
fail:
msg: "ansible_network_os is undefined or not an acceptable platform: '{{ ansible_network_os }}'"
when: ansible_network_os not in [ 'vyos', 'junos', 'ios' ]
- name: vyos Specific includes
include: vyos.yml
when: ansible_network_os == 'vyos'
- name: junos Specific includes
include: junos.yml
when: ansible_network_os == 'junos'
- name: ios Specific includes
include: ios.yml
when: ansible_network_os == 'ios'