forked from ansible/ansible-zuul-jobs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ansible-test-network-integration-eos job
This now adds support to run eos tests against ansible/ansible. Depends-On: ansible/ansible#56126 Depends-On: ansible/ansible#56131 Depends-On: ansible/ansible#56136 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
- Loading branch information
1 parent
77ecd01
commit cb84444
Showing
7 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
playbooks/ansible-test-network-integration-eos/files/bootstrap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
- hosts: controller | ||
gather_facts: false | ||
connection: local | ||
tasks: | ||
- name: Install pexpect requirement | ||
pip: | ||
name: pexpect | ||
extra_args: --user | ||
|
||
- hosts: controller | ||
gather_facts: false | ||
connection: local | ||
tasks: | ||
- name: Enable eAPI access with default configuration | ||
expect: | ||
command: "ssh {{ hostvars['eos-4.20.10'].ansible_host }}" | ||
responses: | ||
'eos-4>': enable | ||
'eos-4#': | ||
- config terminal | ||
- exit | ||
'eos-4\(config\)#': | ||
- management api http-commands | ||
- write memory | ||
- exit | ||
'eos-4\(config-mgmt-api-http-cmds\)#': | ||
- protocol http | ||
- protocol https | ||
- protocol unix-socket | ||
- no shutdown | ||
- exit | ||
timeout: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- hosts: controller | ||
tasks: | ||
- name: Setup tox role | ||
include_role: | ||
name: tox | ||
vars: | ||
tox_extra_args: -- ansible-playbook -vvvv playbooks/ansible-test-network-integration-eos/files/bootstrap.yaml | ||
zuul_work_dir: "{{ zuul.projects['github.com/ansible/ansible-zuul-jobs'].src_dir }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- hosts: controller | ||
tasks: | ||
- name: Create inventory file | ||
template: | ||
src: inventory.j2 | ||
dest: ~/inventory | ||
mode: 0644 | ||
|
||
- name: Run the integration test suite | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/ansible/ansible'].src_dir }}" | ||
shell: ./test/runner/ansible-test network-integration --continue-on-error --diff --tox --tox-sitepackages --python 3.7 --inventory /home/zuul/inventory eos_.* -vv |
10 changes: 10 additions & 0 deletions
10
playbooks/ansible-test-network-integration-eos/templates/inventory.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file is generated by Ansible | ||
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN | ||
# | ||
[eos] | ||
eos-4.20.10 ansible_port=22 ansible_python_interpreter=python ansible_host={{ hostvars['eos-4.20.10'].ansible_host }} ansible_network_os=eos ansible_user=zuul ansible_connection=network_cli ansible_become_method=enable | ||
|
||
[eos:vars] | ||
debug=False | ||
cli={'transport': 'cli', 'authorize': 'yes'} | ||
eapi={'transport': 'eapi', 'use_ssl': 'no', 'port': '80', 'authorize': 'yes'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters