Run a command in ansible


Run a cmd
- name: Install gradle
hosts: localhost
connection: local

tasks:
- name: Unzip gradle
ansible.builtin.command: unzip gradle-7.2-bin.zip
register: myoutput
- name: Create gradle folder
ansible.builtin.command: mkdir gradle_temp
register: myoutput
- name: Move gralde file to folder
ansible.builtin.command: mv gradle-7.2 ./gradle_temp/gralde
register: myoutput


Create folder in ansible
- name: Create gradle folder
file:
path: /usr/local/gradle
state: directory










Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch