Skip to content
Advertisement

Tag: ansible

Issue with lookup(‘dig’) not finding ‘dnspython’

On a Red Hat 8.3 machine I try to use this ansible code: But I get an error: I think maybe the lookup(‘dig’) doesn’t search in the right place… However I think I do in fact have dnspython installed: More info: Answer Converting comment to answer. When you use the pip3 command it references the Python 3.6 version you have

Issue connecting to cisco ios switch with custom menu enabled

I am trying to connect to a Cisco [Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.4(3)M3] switch via ansible/python. But I am facing issue because we have enabled a menu when we connect to vty. Is there any working sample someone can point me towards where I could pass thru this menu and run commands as usual? Thanks Answer You

Why it is possible to use a split filter in ansible?

It might look like a weird question by, I really would like to understand this. I am new to Ansible, and I am trying to understand how I could figure out that I can use a filter called split. As I understand, the Ansible filters are builtin inside Jinja2 engine. On the project website there is nothing about split filter.

Disable metacharacters in regular expressions

Perl has Q and E operators in its regular expression toolkit: Does such a facility exist in Python? I am aware of the in operator to do literal string comparison, but my usecase is that I’m using the lineinfile Ansible module which relies on Python’s regular expression library. I’d like something like this (if you can see the intent even

Problems changing Ansible_Python_Interpreter

How can I change my ansible_python_interpreter value on Ubuntu? I downloaded and installed Python 2.7.12 from tar, and now it’s running by default outside of Ansible But when I try to set the variable, Ansible shows that it’s still using that newer version of Python (I need to use this older version to test) Answer It’s not possible to configure

I am having some issue while creating VM from ansible

I am using Ansible version2. 2.9.9 and Python version 3.6.9; and I have installed requests modules too but every time I run my code I ger error of Mo Module name requests, I have changed the ansible_pythin_interpreter to python 3 as well but it didn’t heled me. Please go through my code and help me here. I have uploaded my

Advertisement