Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
130 views

I have created an Ansible module, but I don't want to keep everything in one file, but split it into packages. In this respect, my custom module is dependent on these packages. When I run my playbook. ...
craftself's user avatar
-3 votes
1 answer
164 views

I have jar file that i want to deploy to diffrent hosts using ansible so i configured my inventory with the domains of my webapps [webapps] domainofwebapp1.com resource_group=RG web_app=WEBAPPname ...
rewa's user avatar
  • 23
0 votes
0 answers
201 views

Target host for Ansible is AltLinux server v10.2. Now I do not know how to specify a specific package version for installation via apt_rpm module. In official doc https://docs.ansible.com/ansible/...
Никита Буднов's user avatar
3 votes
1 answer
238 views

How to stop Windows services with special characters using Ansible win_service module? I am facing an error when I try to stop SQL Server services using win_service module when the service has $ in it ...
Jbarboza09's user avatar
3 votes
0 answers
115 views

How can you differentiate between a non-required module parameter that's passed to an Ansible Python module with a null value, and a non-required module parameter that's not given in the invocation? E....
Haruka Shitou's user avatar
3 votes
1 answer
1k views

I have a playbook that is retrieving data from a test database, but I am unable to figure out how to extract the rows returned from the database. The whole purpose of the exercise is to pull the value ...
biker_steve's user avatar
0 votes
0 answers
252 views

I want to create a Custom Module call API which will take action: get or search resource: car/truck/plane/ship optional parameters - dynamic parameter based on action and resource For example if ...
tempuser's user avatar
  • 2,027
2 votes
1 answer
555 views

I am currently developing a number of Ansible modules using Python. My directory structure looks like this: / playbook.yml library/ module1.py module2.py Using this, I can run the ...
mat's user avatar
  • 1,817
5 votes
1 answer
2k views

Each Ansible module's documentation page has an "Attributes" section. For example, here is the one for the command module. It has these attributes: check_mode, diff_mode, platform and raw. ...
lonix's user avatar
  • 22.4k
0 votes
0 answers
614 views

I have a custom module to manage Keycloak realms. That module takes a long list of arguments including a sub-dictionary for smtp_server: def keycloak_argument_spec(): return dict( ...
TRW's user avatar
  • 1,034
0 votes
1 answer
977 views

I'm using Ansible to provision AWS EC2 instances with the Amazon.Aws collection. On the cli, if I want to get the latest Amazon Linux 2 AMI I may run something like this: $ aws ec2 describe-images \ ...
Chris King-Parra's user avatar
1 vote
1 answer
350 views

I want to run the following apt command via an Ansible module. apt-get update -o Dir::Etc::sourcelist="sources.list.d/mypackages.list" -o Dir::Etc::sourceparts="-" -o APT::Get::...
Shubham Saroj's user avatar
0 votes
1 answer
172 views

Is it possible to access Ansible tasks parameters from the Python module code? Specifically, I would like to check if there is a register on the task in order to return a more complete info set.
mooky's user avatar
  • 129
1 vote
1 answer
618 views

I have an Ansible task almost identical to the top answer here: Ansible playbook wait until all pods running - name: Wait for all control-plane pods become created shell: "kubectl get po --...
Josh's user avatar
  • 31
0 votes
0 answers
373 views

I'm trying to create a role with argument validation via the meta/arguments_spec.yml file, and I'd like a user to be able to pass in a tree of arbitrary depth as one of the arguments. In other words, ...
user3781737's user avatar
  • 1,032
2 votes
1 answer
774 views

I have a custom module that resides in the library/ directory of my Ansible role. I can call the module from within my playbook, and the code executes correctly, but only if the values it expects are ...
GreNIX 's user avatar
1 vote
1 answer
564 views

I wrote an ansible module is bash. It is working fine, but if want to pass arguments to that module and read them in the bash module how can I do that .. please help - name: get top processes ...
user avatar
0 votes
1 answer
179 views

Why is it that on the playbook.yml under the command task to be executed, some modules have a quotation mark while some does not? For example, if you check the syntax below, the module line is with ...
blast's user avatar
  • 99
4 votes
1 answer
773 views

I'm looking for a way of specifying that a module argument can't be used if another argument has a certain value. You can specify required_if to require an argument if another argument has a specific ...
Wes Toleman's user avatar
4 votes
1 answer
11k views

I get this error: ERROR! couldn't resolve module/action 'kubernetes.core.k8s'. This often indicates a misspelling, missing collection, or incorrect module path. However, I thought I installed it and ...
Benjamin W Larson's user avatar
1 vote
0 answers
471 views

I've to perform some network automation in my infra using ansible. When I'm trying to use ansible module for icx switches it seems to be misbehaving. Playbook I used --- - name: ICX switch testing ...
saurabh's user avatar
  • 21
3 votes
2 answers
3k views

I have gathered the list of all users using getent_module: - name: Get user info getent: database: passed This returns this variable as getent_passwd, a dictionary like this: { "uuidd&...
Shaghayegh Tavakoli's user avatar
3 votes
1 answer
3k views

Is there a module that allows me to check disk space of a folder like the command df -h /path/to/folder? I want to avoid using the shell or command module, I can't believe there is no module for it.
Mirco's user avatar
  • 240
0 votes
1 answer
92 views

I have to two array from mysql query and I want to make a host comparison. For example, the result of mysql result is like list1 & list2. - name: set_fact: list1: - host: '[\"X....
Mansour NDIAYE's user avatar
0 votes
2 answers
218 views

I am trying to enhance my playbook by storing the hostname of the changed machines locally, and I want to use as much as possible of the ansible module that is why I choosed the usage of th copy ...
Jinja_dude's user avatar