사용자 도구

사이트 도구


build_deploy_management:ansible

문서의 이전 판입니다!


Ansible

AWS

Local 실행

- name: playbook name
  hosts: 127.0.0.1
  connection: local
  tasks:
    - name: blah.. blah..
# 실행
ansible-playbook playbook.yml

File 생성

  tasks:
  - name: Ansible create file with content example
    copy:
      dest: "/Users/mdtutorials2/Documents/Ansible/remote_server.txt"
      content: "contents"
      mode: 0777
      owner: mdtutorials2

환경변수 읽기

- debug: msg="{{ lookup('env','HOME') }} is an environment variable"

참조

build_deploy_management/ansible.1599975944.txt.gz · 마지막으로 수정됨: 2020/09/13 14:45 저자 kwon37xi