ansible_files
-
ansible variablesansible 2022. 2. 6. 15:43
inventory 에 정의하기 inventory.txt web1 ansible_host=192.168.0.17 [web_servers] web1 [web_servers:vars] SERVICE_PORT=8080 [all:vars] HOME_DIR='/home' playbook.yml - name: inventory variables hosts: web_servers tasks: - name: echo vars command: echo 'HOME_DIR={{ HOME_DIR }} SERVICE_PORT={{ SERVICE_PORT }}' register: result - name: echo result debug: msg={{ result['stdout_lines'] }} playbook 에 정의하기 pl..