feat: 简单执行ansible命令或者ansible-playbook剧本

This commit is contained in:
2025-07-03 21:18:42 +08:00
parent 3766fd5244
commit e3c26b613b
12 changed files with 458 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
---
- hosts: all
gather_facts: false
vars:
array:
- Your are running
- 'ansibleplaybook-json-stdout'
- first example
map:
intro: Your are running
what: ansibleplaybook-json-stdout
outro: first example
tasks:
- name: ansibleplaybook-json-stdout
debug:
msg: |
Your are running
'ansibleplaybook-json-stdout'
first example
- name: ansibleplaybook-json-stdout from array
debug:
msg: "{{ array }}"
- name: ansibleplaybook-json-stdout from map
debug:
msg: "{{ map }}"