Skip to main content
-6 votes
1 answer
77 views

How can I enable Windows built-in firewall rules independently of localization? [closed]

Windows has a lot of built-in firewall rules. Not all of them are enabled by default. I want to write an Ansible playbook, that can enable specific rules. Unfortunately, the rule names and groups are ...
stackprotector's user avatar
1 vote
2 answers
110 views

Finding all objects matching a neighboring key in XML

I have a playbook in Ansible that will allow me to identify a specific set of firewalls, and then update them to a higher version of software. However, I need to take the existing output of my API ...
Moridn's user avatar
  • 51
0 votes
0 answers
43 views

Ansible playbook fails on Windows environment

I have made some Ansible playbooks that retrieve information from hostvars to build a host inventory and upload it to a mariaDB database. It runs on our AWX server, myawxserver, a Linux machine. The ...
dr_'s user avatar
  • 2,315
0 votes
0 answers
44 views

Ansible playbook running a command on a server that's not in the host file [duplicate]

From within an Ansible playbook, after reading a file, I have retrieve two host names that are not in the host inventory file. On the two retrieve host names, I want to execute a UNIX shell command ...
John's user avatar
  • 1
2 votes
1 answer
90 views

How to parse multiple email addresses from json data in Ansible via map(regex_search) filter

I've been trying to parse email addresses from the below json data: "msg": [ { "fqdn": "www.westero.local", "function": "", ...
pilipeet's user avatar
-1 votes
1 answer
48 views

How to make Ansible templates ignore certain changes

We use Ansible to maintain a large distributed application, which keeps various credentials scattered among multiple configuration-files (in different formats, too!) These credentials aren't known to ...
Mikhail T.'s user avatar
  • 4,226
1 vote
1 answer
64 views

In Ansible YAML, how do I pass different variables to an include_tasks to make it reusable?

I have a workflow where I download a file, do some stuff to it, upload it, and then download it again to verify that the changes took place. I want my download logic to be in a reusable YAML file that ...
The Lemon's user avatar
  • 1,467
1 vote
1 answer
90 views

Ansible Automation Platform: How to pass variable into Python script?

In a Bash script we need to write $1 instead the variable, remove the read command, define the survey in the AAP to execute the Bash file, and add the arguments in the shell module. It works. Now, how ...
picgon's user avatar
  • 11
0 votes
1 answer
68 views

Why is a JSON list parsed by Ansible Jinja not an iterable [closed]

I am attempting to write an ansible playbook that will need to iterate over items returned from an API. I am getting a JSON response from the ansible.builtin.uri module which includes a JSON list. ...
albgus's user avatar
  • 23
2 votes
2 answers
77 views

How can I transform a list of dictionaries containing two keys into a string?

I created an Ansible role that is setting up cron jobs for a user in a wide variety of Linux distros and versions. The cron jobs to be set up are defined in crontab_entries variable. Also there are ...
Trifo's user avatar
  • 306
1 vote
1 answer
109 views

How to sum up numbers across inventory?

CSV files on each host contain certain figures and I need to add them all up. To that end, I find the matching files first, and invoke awk to parse the CSV content and output the per-host total. Where ...
Mikhail T.'s user avatar
  • 4,226
0 votes
2 answers
113 views

Ansible (Jinja2) Case Insensitive selectattr

I am looking to perform a case insensitive comparison in Ansible with selectattr. The below works, but does not guarantee a case insensitive comparison. __app_pools_info.app_pools | selectattr('...
Kimmel's user avatar
  • 667
2 votes
1 answer
57 views

Ansible code using with_sequence with when condition applied

- name: ABC block: - include_tasks: abc.yaml with_sequence: start={{ (x | int) + 1 }} end={{ y | default(1, true) | int }} loop_control: loop_var: item when: - (y | ...
Dodla Nirenitha's user avatar
3 votes
2 answers
92 views

Can an ansible collection query its own metadata?

Assuming an ansible collection with the following galaxy.yml file: namespace: my-company name: test version: "1.0.0" ... is there a way from a task in my collection to find the 1.0.0 in the ...
Wouter Verhelst's user avatar
1 vote
1 answer
78 views

Ansible `from_yaml` on a value from a vault

I am trying to use the from_yaml filter on a value stored in an Ansible vault. The exact same value works just fine when it is not stored in a vault value. - hosts: all vars: unenc_yaml: "...
Erik Ogan's user avatar

15 30 50 per page
1
2 3 4 5
1533