Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report for Ansible Workshops #2218

Open
timothyhull opened this issue Dec 12, 2024 · 0 comments
Open

Bug report for Ansible Workshops #2218

timothyhull opened this issue Dec 12, 2024 · 0 comments
Assignees

Comments

@timothyhull
Copy link

timothyhull commented Dec 12, 2024

Problem Summary

Overview

Hello, I'm working through the Ansible Network Automation Workshop, and I believe I found a bug that impacts the expected behavior in Exercise 8, step 8 and step 9.

Problem Details

The Network-Commands Job Template uses a multiple choice Survey with an Answer variable name of controller_input, although the corresponding playbook network_commands.yml relies on a variable named survey_input. The resulting behavior is, the Job Template always uses the default value of show version in the playbook.

Recommended Solution

I verified the following edit to line 11 of the playbook resolves the problem:

        command: "{{ controller_input  | default('show version') }}"

Issue Type

Bug

Extra vars file

This is a sample file I took from this repo; I can't seem to locate the correct extra_vars.yml file on my instance of Automation Controller.

---
# region where the nodes will live
ec2_region: us-east-1
# name prefix for all the VMs
ec2_name_prefix: TESTWORKSHOP
# amount of work benches to provision
student_total: 2
# workshop is put into networking mode
workshop_type: network
# Required for AAP download https://access.redhat.com/articles/3626371
offline_token: "234234234234234234234234234234234234234"
# Required for podman authentication to registry.redhat.io
redhat_username: [email protected]
redhat_password: R3dh4t!
# DNS domain
workshop_dns_zone: demoredhat.com
## Optional Variables
# password used for student account on control node
admin_password: ansible
# turn DNS on for control nodes, and set to type in valid_dns_type
dns_type: aws
# creates HTML website for workshop
create_cluster: false

Ansible Playbook Output

Identity added: /runner/artifacts/6/ssh_key_data (/runner/artifacts/6/ssh_key_data)

PLAY [CLI command playbook] ****************************************************

TASK [Specified command is run] ************************************************
ok: [rtr1]

TASK [Return results to terminal] **********************************************
ok: [rtr1] => {
"msg": [
"Cisco IOS XE Software, Version 17.14.01a",
"Cisco IOS Software [IOSXE], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 17.14.1a, RELEASE SOFTWARE (fc1)",
"Technical Support: http://www.cisco.com/techsupport",
"Copyright (c) 1986-2024 by Cisco Systems, Inc.",
"Compiled Thu 25-Apr-24 18:53 by mcpre",
"",
"",
"Cisco IOS-XE software, Copyright (c) 2005-2024 by cisco Systems, Inc.",
"All rights reserved. Certain components of Cisco IOS-XE software are",
"licensed under the GNU General Public License (\"GPL\") Version 2.0. The",
"software code licensed under GPL Version 2.0 is free software that comes",
"with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such",
"GPL code under the terms of GPL Version 2.0. For more details, see the",
"documentation or \"License Notice\" file accompanying the IOS-XE software,",
"or the applicable URL provided on the flyer accompanying the IOS-XE",
"software.",
"",
"",
"ROM: IOS-XE ROMMON",
"",
"rtr1 uptime is 2 days, 21 hours, 50 minutes",
"Uptime for this control processor is 2 days, 21 hours, 51 minutes",
"System returned to ROM by reload",
"System image file is \"bootflash:packages.conf\"",
"Last reload reason: Unknown reason",
"",
"",
"",
"This product contains cryptographic features and is subject to United",
"States and local country laws governing import, export, transfer and",
"use. Delivery of Cisco cryptographic products does not imply",
"third-party authority to import, export, distribute or use encryption.",
"Importers, exporters, distributors and users are responsible for",
"compliance with U.S. and local country laws. By using this product you",
"agree to comply with applicable laws and regulations. If you are unable",
"to comply with U.S. and local laws, return this product immediately.",
"",
"A summary of U.S. laws governing Cisco cryptographic products may be found at:",
"http://www.cisco.com/wwl/export/crypto/tool/stqrg.html",
"",
"If you require further assistance please contact us by sending email to",
"[email protected].",
"",
"License Level: ",
"License Type: Perpetual",
"Next reload license Level: ",
"",
"Addon License Level: ",
"Addon License Type: Subscription",
"Next reload addon license Level: ",
"",
"The current throughput level is 20000 kbps ",
"",
"",
"Smart Licensing Status: Smart Licensing Using Policy",
"",
"cisco C8000V (VXE) processor (revision VXE) with 1955292K/3075K bytes of memory.",
"Processor board ID 9Y05XAM9GRY",
"Router operating mode: Autonomous",
"1 Gigabit Ethernet interface",
"32768K bytes of non-volatile configuration memory.",
"3898684K bytes of physical memory.",
"11526144K bytes of virtual hard disk at bootflash:.",
"",
"Configuration register is 0x2102"
]
}

PLAY RECAP *********************************************************************
rtr1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

Ansible Version

ansible [core 2.15.5]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/student/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /home/student/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.9.16 (main, Sep 12 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True

Ansible Configuration

ACTION_WARNINGS(/etc/ansible/ansible.cfg) = False
COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH(/etc/ansible/ansible.cfg) = ignore
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/home/student/lab_inventory/hosts']
DEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = yaml
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 60
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
DEVEL_WARNING(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_silent
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 200
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 200
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
SYSTEM_WARNINGS(/etc/ansible/ansible.cfg) = False

Ansible Execution Node

Ansible Controller (previously known as Ansible Tower)

Operating System

RHEL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants