Im new on AWX and I want to learn about network automation. Im trying to do a template from AWX to a router cisco, but I get an error of ssh. Next the step I did.
I did a testing environment with:
GNS3 VM to emulate routers (cisco c3725 and CSR1000v).
AWX on a K8s cluster, installed with awx-operator and kustomize.
The routers are running without problems, I can ping them after configuring the project with a cloud:
Topology:
The thing was that I was using the subnet 192.168.0.0/16 for the cluster and my local network was /24, so when the pod of AWX in charge of the job had an IP that my LAN router didn’t know, he send the traffic to the gateway and I ssh connection never succeed. To solve the problem I changed my LAN configuration and now everything works fine.
Sorry but can i check if you happen to have community.general in the collections ?
I was trying to build a custom ee too but they all failed without any success. Using your ee, I was able to at least query my routers.
Yes Im using ubuntu to build the ee. I follow this steps:
run ansible-builder
sudo ansible-builder build --tag --container-runtime docker
check
sudo docker images
tag image
sudo docker tag : /:
push to docker hub
sudo docker push /:
to test
create a directory with hosts and playbooks
~/exmaple
/inventory
/hosts
/project
/test.yml
RUN ANSIBLE-RUNNER
sudo ansible-runner run --process-isolation --process-isolation-executable docker --container-image /: -p test.yml ~/example
i followed the contents of the files. and got this error twice… Did you see this error too ?
(builder) awx@Ubuntu-virtual-machine:~/ansible-builder$ ansible-builder build --tag tester/custom-ee:1.0.0 --container-runtime docker
Running command:
docker build -f context/Dockerfile -t tester/custom-ee:1.0.0 context
Running command:
docker run --rm -v /home/awx/ansible-builder/builder/lib/python3.10/site-packages/ansible_builder:/ansible_builder_mount:Z tester/custom-ee:1.0.0 python3 /ansible_builder_mount/introspect.py
File context/_build/bindep_combined.txt had modifications and will be rewritten
File context/_build/requirements_combined.txt had modifications and will be rewritten
Running command:
docker build -f context/Dockerfile -t tester/custom-ee:1.0.0 context
…showing last 20 lines of output…
File “/tmp/pip-install-jlyspaew/pycurl_ea0d3bb2337043e5bcb85a3b36ff7f2a/setup.py”, line 970, in
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File “/tmp/pip-install-jlyspaew/pycurl_ea0d3bb2337043e5bcb85a3b36ff7f2a/setup.py”, line 634, in get_extension
ext_config = ExtensionConfiguration(argv)
File “/tmp/pip-install-jlyspaew/pycurl_ea0d3bb2337043e5bcb85a3b36ff7f2a/setup.py”, line 93, in init
self.configure()
File “/tmp/pip-install-jlyspaew/pycurl_ea0d3bb2337043e5bcb85a3b36ff7f2a/setup.py”, line 234, in configure_unix
raise ConfigurationError(msg) main.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: ‘curl-config’
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
The command ‘/bin/sh -c /output/install-from-bindep && rm -rf /output/wheels’ returned a non-zero code: 1
I see that error while I was adding some collection that couldn’t be added. Maybe try to do a smaller EE with only the necessary collections you need and then add more
HI, i am trying to achieve backing up my routers using awx, i am able to push commands on the router and interact with router using ansible
since the code is running inside a container, i am not able to get the file out of the container as it gets deleted after execution
can someone advise, how we can get this output be stored on the host and then get it synced with gitlab