Login
Default
Home
Containers
Host Nodes
Tasks
Definitions
Toggle theme
Light
Dark
Auto
Edit Task Definition
Task Name
Enter the name of the task.
Goal
Describe the goal you want to achieve, such as 'Install Nginx and start the service.'
Task Data (JSON)
- name: Check if MySQL is installed ansible.builtin.package_facts: when: ansible_facts.packages['mysql-server'] is defined - name: Gather MySQL version ansible.builtin.command: cmd: "mysql --version" register: mysql_version changed_when: false - name: Output the MySQL version debug: var: mysql_version.stdout when: mysql_version.stdout is defined - name: Show MySQL databases ansible.builtin.command: cmd: "mysql -u root -e 'SHOW DATABASES'" register: mysql_databases changed_when: false - name: Output the list of MySQL databases debug: var: mysql_databases.stdout_lines when: mysql_databases.stdout_lines is defined
Save
Regenerate Task Data
Back to List
Delete Task Definition
Loading...