Category "ansible"

Merge 2 json arrays based on their keys

How can I merge 2 json arrays based on the same keys and add a 3rd item from the input json pog_id in the output json file? I have tried with the code mentioned

is there a way to automate VMware snapshot deletion by setting a schedule through Ansible or rest API

I am trying to figure out if there is a way to automate VMware snapshot deletion through Ansible. I have found vmware_guest_powerstate.py"to be closest to it an

How to measure and display time taken for tasks when running ansible-playbook?

I have one playbook and in this playbook, there are so many tasks. I need to know which task has taken how much time? Is there any solution?

Ansible playbook to install and configure MySQL on Ubuntu

I am trying to set up MySQL reasonably secured, on Ubuntu 22.04, using Ansible. This is my playbook (from a post by Lorin Hochstein) See Ansible idempotent MySQ

Is getting Ansible to work with Pulumi possible?

I wish to create several droplets (DigitalOcean) in a loop and then run Ansible afterwards on the droplets to setup the required software and security measures.

Ansible cannot pickle 'module' object

Running the playbook with $ ansible-playbook test-playbook.yml Getting error response ERROR! Unexpected Exception, this is probably a bug: cannot pickle 'mod

"Msg: The module win_ping was redirected to ansible.windows.win_ping, which could not be loaded "

I tried to install the ansible.windows collections using "ansible-galaxy collection install ansible.windows", but I'm getting error as "Error! Unkown error whe

troubleshooting ansible SSH can't reach a root cause

I'm having issues running some playbooks where I define ansible_user_ssh=root in the command line and the ssh command through ansible, returns permission denied

How to activate python virtual environment on remote machine with ansible?

I'm learning Vagrant and Ansible, I'm trying to setup a local development environment for a basic flask app in ubuntu20.04 with Nginx. my vagrantfile looks like

Cannot execute k8s module

My code in tasks/main.yml. - name: Check Istio services k8s_info: api_version: v1 kind: Service namespace: istio-system But it returns; An ex

Ansible how to install a package only if same version not installed

I am trying to check the existing version of the package and run the install task if the same version is not been installed already. Below is the code I am tryi

Ansible, create list of dictionaries from list of dictionaries, with specific subkey containing dictionary

I'm trying to create a list of dictionaries, from a list of dictionaries which contains a key with a dictionary as a value. So, I want a list of dictionaries e

How to start a process (or Kafka to be specific) on remote host with Ansible Playbook

How to start Zookeeper and Kafka broker on remote target with Ansible Playbook. Following commands work fine locally. Start Zookeeper: cd /opt/kafka ./bin/zooke

Ansible include_tasks will not run when tags are specified

I am including some tasks like shown below in my main.yml (as one of the tasks in a list of several other tasks) - name : remove swarm include_tasks

Module failed to start Ansible

I'm new in Ansible. I'm working on an Ubunto machine. On the VM, I installed Ansible along with to apply play books to. When I run a playbook I receive the fol

Ansible Windows Kerberos Authentification Bad HTTP response returned from server Code 500

After configuring winRM on a windows server and filling all needed information to connect : --- ### winrm / win connection ### ansible_winrm_realm: *My AD Dom

FAILED! => {"changed": false, "msg": "apt cache update failed"} when trying to

I am new to Ansible and try, as an example, a task to install Vivaldi. My only task in a role Vivaldi update starts with - name: Run apt upgrade apt:

How do you list the versions of an Ansible Galaxy role using the ansible-galaxy command?

When I use "ansible-galaxy info author.role_name" I get substantial info, but not a list of previous versions. On the website, each role has a nice list of prev

Nested loop with user and folder in Ansible

I have the following task: - name: Create required folders. become: true ansible.builtin.file: owner: "{{ item.key }}" group: ftp mode: '0755'

How to pass token to requirements.yaml used by ansible galaxy for installing pre-requisites

I am trying to use an environment variable inside of requirements.yml but it's not working - src: 'http://oauth2:{{ lookup("env", "GITLAB_TOKEN") }}@gitla