Why do you you need to run constant playbook runs? are you looking to
enforce OS state with Ansible? (I.E: CIS standards or is this more an
application question?)
CICD strategies are for pushing out updates only when there is an update to
your code. This is great for applications, but will almo
I've tried ansible-cmdb but it doesn't work as well as I would like and
it's not been updates for a long time. I did try and contact the author as
i had some ideas to make it better but got no reply.
I created this to solve the same problem but I store the results in a
mongoDB. I created an an
I added a GitHub repo with a few examples showing how to parse your JSON
file.
I've already had a contribution extending my code and creating a loop to
pull out all the matches.
https://github.com/dmccuk/json_parsing_with_ansible
On Tuesday, 22 March 2022 at 17:14:27 UTC dmc...@gmai
JSON isn't my strong point but I can pull out the individual elements and
you wanted to create the msg. Hopefully this will help you to complete what
you're trying to do.
TASK [debug]
**
ok: [lo
I'm trying to capture the linux banner you see before you login to a Linux
server - using Ansible. I don't want to login to the server, just get the
banner. I was hoping to use register to save it, then use part of it's
contents as a conditional for which tasks to run.
Is this possible?
I or
Hi,
For my ELK role I created a service each for elasticsearch, kibana and
logstash. It just makes it easier to start and stop the ELK stack
components and you can enable them at boot. You can see the role I created
here with all the code:
https://github.com/dmccuk/ansible_ELK/blob/master/roles
Thanks for that, It was exactly what I was looking for. I was so close...
This is what I get:
$ ansible localhost -m setup | sed '1 s/^.*$/{/' | jq '.ansible_facts |
{hostname: .ansible_hostname, Disks: .ansible_devices |
with_entries(.value |= .size), Partitions: [.ansible_devices[].partitio
Is anyone good with ./JQ?
I'm trying to pull out data from the setup output from Ansible. I can do
most of what I need to but I'm stuck on something that is probably quite
simple.
I'm trying to generate a list of hosts including disks + sizes and
partitions + sizes AND mount points.
I can get
Can you provide more detail with an example of a variable you are trying to
pass?
As I'm not sure what you need to set, this could help?
Using set_fact: (example below), you can set a variable to be "something"
based on a condition. So variable "DC" below, will become one of three
variables "D
Can you provide more detail with an example of a variable you are trying to
pass?
As I'm not sure what you need to set, this could help?
Using set_fact: (example below), you can set a variable to be "something"
based on a condition. So variable "DC" below, will become one of three
variables "D
Can you provide more detail with an example of a variable you are trying to
pass?
As I'm not sure what you need to set, this could help?
Using set_fact: (example below), you can set a variable to be "something"
based on a condition. So variable "DC" below, will become one of three
variables "D
Have you tried Ansibledb? It seems a waste to only get one piece of
information.
AnsibleDB can take in the output of the setup module and store it so you
can just run curl commands against the API and pull out the version you're
after from all your cisco routers at once. in your case, you'd nee
If I'm understanding you correctly, you're creating facts, then you want to
use the same just created facts in the same ansible run?
If this is the case, you can reload the facts and use them in the playbook
using something like this:
- name: local facts
debug: var=ansible_local
notify:
-
"
},
"changed": false,
"ping": "pong"
}
and it works? Is anyone able to tell me the difference? You help would be
greatly appreciated.
On Tuesday, 3 November 2020 at 10:19:24 UTC brae...@gmail.com wrote:
> On 11/3/20 11:03 AM, dmc.
tput. Ansible cli will
accept the file output being used with or without the last "," so it's odd
for me. I'm supplying the list of hosts in a format that Ansible will run
against based on the file (output of the script), but ansible won't take
the same output from the scr
I'm trying to create a basic dynamic inventory script for ansible based on
json output. I'm new to jq but I've hit an issue where the dynamic script
on ansible v2.9.14 & 2.9.15 doesn't like the output, but if I send the
output to a file and then run Ansible against the output in the file,
ansib
"REGION": "eu-west-3",
"Support_Team": "Win_Team",
"cloud": "AWS",
"environment": "DIT",
"my_custom_fact": "value"
},
On Friday, 18 Septe
m
>> wrote:
>>
>>> Just try it out and see for yourself. I have placed the following script
>>> at C:\Windows\TEMP\facts\my_facts.ps1 with the contents
>>>
>>> @{
>>> my_custom_fact = 'value'
>>> my_complex_custom_fa
Can anyone point me in the direction of how to setup custom/local facts on
Windows please? not just use fact_path...
Reading the docs I've found so far, it looks like you can't just have a
file with key:value like Linux under the heading [local_facts] for example
(unless you can? but setup does
19 matches
Mail list logo