Having an issue where npm install doesn't work on my Vagrant setup using Ansible, but runs smoothly from the console. SITUATION 1) I have a playbook with the following lines: ... - name: install frontend libs npm: path=/vagrant/frontend/bem ... When ...
I'm experiencing difficulties with using the json_query function to filter arrays based on a specific key value. When providing the direct path, this is the API result that is displayed: ok: [localhost] => { "msg": [ { ...
I am currently running my Ansible playbook from Python using ansible_runner. My goal is to improve the logs and retrieve specific event results. Typically, when the Ansible playbook is executed from the command line, it provides a human-readable output in ...
Currently, I am delving into the realm of creating my own ansible modules. To test a new module that I've developed, I have created a playbook named test_playbook.yml: --- - hosts: all tasks: - name: Suspend MNR realtime_server: serv ...
Currently facing an issue with replacing values and creating a json template in ansible for sending via the uri module to a webserver. Seeking assistance from anyone who can help? It appears that ansible is converting all double brackets in the json to si ...
Currently, I am utilizing Ansible to automate configuration steps for my application VM. However, I am facing challenges when trying to add a new key-value pair to an existing JSON file on the remote host. Let's assume I have this initial JSON file: { ...
I am having trouble extracting the values of vs_name for each item in the array list. There seems to be an issue with my code, but I can't seem to pinpoint it. Below is the desired output that I need to parse: ok: [localhost] => { "msg" ...
I am attempting to retrieve the CDN domain name associated with a specific Alias from Ansible's cloudfront_facts. The output, in summary form, looks like this: { "cdn_facts": { "ansible_facts": { "cloudfront": { "summary": { "distrib ...
My current task involves comparing running services before and after a reboot on Linux servers. However, I am facing difficulty in getting the output to display the differences. The function I have right now saves the pre/post state to disk. Ideally, I wo ...
Currently, I am facing a challenge where I have an integer that needs to be converted into a MAC address. I attempted using the hwaddr in Ansible but it did not provide the desired result. Any assistance with this would be highly appreciated. I also explo ...
I am in need of modifying a JSON file in a specific way. My goal is to remove an entire object from the file based on a certain condition. In this case, the condition is that "name": "value1_1:value1_2" The value of value1_1 is what I am targeting for ...
My goal is to extract specific data from a JSON response acquired through an API call using the uri module. The JSON output consists of key value pairs structured like this: item : "name-of-the-item" "json" : { "data": { ...
We encountered a new problem when trying to compress Django static files on our production servers. Our setup includes Ubuntu 16.04, Python 3.x, and Django 1.11. I am using an ansible-playbook for deployment. The specific error message we are seeing is: ...
I encountered an error while trying to execute my playbook, despite having pyEZ installed. Can someone assist me in resolving this issue? MCBOOK:~ user2018$ ansible-playbook simpletest.yml [DEPRECATION WARNING]: [defaults]hostfile option, The key is ...
I need assistance parsing the below JSON output from Ansible using jq. Specifically, I am trying to extract the version number for a package named GeoIP. How can I efficiently utilize jq to retrieve this version number for the specified package? The desir ...
I'm currently navigating the world of ansible, winrm, virtualenv, and Jenkins. So far, I've successfully installed Ansible with Tom via epel-release. My configuration for Jenkins is still at a basic level. In my journey, I created a virtualenv named $HOM ...
Utilizing Ansible Automation for Linux Patching. After completing the patching process, I need to extract specific details from the JSON output. Below is the code snippet that does not provide accurate output from the JSON file when executing the playbook ...
I am trying to extract the UserId from the following output: ok: [localhost] => {"ansible_facts": {"Usernamelis": "", "_raw_params": ""{u'Users': [{u'UserName': u'reo', u'PasswordLastUsed': u'2016-01-08T14:00:34Z', u'CreateDate': u'2016-01-06T14 ...
I am facing a challenge with the script execution on a machine that has zsh installed. Here is what I have set up: Software Installed # Install NVM sudo curl https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash ## Reload shell to st ...
Currently, I'm working with ansible 2.5 and python 2.7 on a project that involves executing calculations on dynamic JSON variables. The variable in question is not fixed and can contain anywhere from 1 to 1000 objects. For example: var: [ { "name": ...
I am currently working with the following data: { "additionalInfo": [], "id": "8d929134-0c71-48d9-baba-28fb5eab92f2", "instanceTenantId": "62f4c8ab6a041c1c090f ...
Task at hand involves reading the contents of a file and for each line in JSON format, executing a script. This part is functioning correctly. - name: create users script: cmd: myscript.sh "{{item}}" with_lines: "cat users-list" ...