Hello Ansible Team
I am trying to develped below task
CPU/Memory related alerts need manual intervention to review the system
health against the resources consuming the CPU/MEMORY. Every time engineer
needs to login to the system and performs the troubleshooting leading more
effort consumptio
Hello All
Any one have any idea on that please help me
Thanks
Avinash
On Tue, 16 Jun 2020, 20:04 Avinash Jadhav,
wrote:
> Hello Ansible Team
>
> I am trying to develped below task
>
> CPU/Memory related alerts need manual intervention to review the system
> health aga
You can try
Yaml
- name: Execute the script with variables
ansible.builtin.command: bash /tmp/test.sh
vars:
script_var1: "{{ ansible_var1 }}"
script_var2: "{{ ansible_var2 }}"
Shell script
#!/bin/bash
echo "Script variable 1: $script_var1"
echo "Script variable 2: $script_var2"
Please try this one
---
hosts: localhost
tasks:
- name: "subtask"
command: lsblk --nodeps | grep disk | wc -l
register: disk_count_result
- name: "set fact"
set_fact:
disk_count: "{{ disk_count_result.stdout | int }}"
- name: "print disk count"
debug:
msg: "Disk
Please try this one
- template:
args_var: item
owner: root
group: radiusd
mode: "0640"
loop:
- { src: clients.conf.j2, dest: /etc/raddb/clients.conf }
- { src: proxy.conf.j2, dest: /etc/raddb/proxy.conf }
On Wed, 1 Nov, 2023, 00:50 Orion Poplawski, wrote:
> I find mys