사용자 도구

사이트 도구


build_deploy_management:ansible

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
build_deploy_management:ansible [2020/09/14 23:01]
kwon37xi
— (현재)
줄 1: 줄 1:
-====== Ansible ====== 
-  * http://www.ansible.com/ 
-  * https://docs.ansible.com/ 
-  * [[https://docs.ansible.com/ansible/latest/modules/list_of_all_modules.html|Ansible All modules]] 
-  * [[https://github.com/ansible/ansible-examples|ansible/ansible-examples: A few starter examples of ansible playbooks, to show features and how they work together. See http://galaxy.ansible.com for example roles from the Ansible community for deploying many popular applications.]] 
-  * [[https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html|Best Practices — Ansible Documentation]] 
-  * 자동화 툴 
- 
-===== AWS ===== 
-  * https://github.com/ansible/awx : Web UI 
- 
-===== become ===== 
-  * ''become: yes'' 일 경우 ''sudo'' 로 명령을 실행한다. 
-  * 이때, 비밀번호를 받는 다양한 방법이 존재할 수 있는데, 일단 ''ansible-playbook''에 ''%%--ask-become-pass%%'' 옵션을 주면 최초 시작시 비밀번호를 물어본다. 
- 
-===== Local 실행 ===== 
-  * [[https://gist.github.com/alces/caa3e7e5f46f9595f715f0f55eef65c1|How to run an Ansible playbook locally]] 
-  * 해당 playbook yml 이 Local 전용일 경우에는 다음 yml 설정으로 충분함. 
- 
-<code yml> 
-- name: playbook name 
-  hosts: 127.0.0.1 
-  connection: local 
-  tasks: 
-    - name: blah.. blah.. 
-</code> 
-<code sh> 
-# 실행 
-ansible-playbook playbook.yml 
-</code> 
- 
-===== File 생성 ===== 
-  * [[https://www.mydailytutorials.com/ansible-create-files/|How to create files in Ansible - My Daily Tutorials]] 
-  * [[https://docs.ansible.com/ansible/latest/modules/copy_module.html|copy module]] 
-  * [[https://docs.ansible.com/ansible/latest/modules/file_module.html|file module]] 
-<code yml> 
-  tasks: 
-  - name: Ansible create file with content example 
-    copy: 
-      dest: "/Users/mdtutorials2/Documents/Ansible/remote_server.txt" 
-      content: "contents" 
-      mode: 0777 
-      owner: mdtutorials2 
-</code> 
- 
-===== 환경변수 읽기 ===== 
-  * [[https://docs.ansible.com/ansible/latest/plugins/lookup/env.html|env – read the value of environment variables — Ansible Documentation]] 
-<code> 
-- debug: msg="{{ lookup('env', 'HOME') }} is an environment variable" 
-</code> 
- 
-===== 변수(var) 외부에 두고 include ===== 
-  * [[https://www.toptechskills.com/ansible-tutorials-courses/ansible-include-import-variables-tutorial-examples/|How to Include Variables in Ansible + Examples | TopTechSkills.com]] 
-  * ''vars_files'' : 외부 yml 파일의 key/value 쌍을 변수로 읽어들인다. 기본 경로는 현재 플레이북 경로이다. 
-<code yml> 
-- name: blah blah.. 
-  hosts: ... 
-  vars_files: 
-    - "vars.yml" # file in the same directory 
-  tasks: ... 
-</code> 
-  * ''vars.yml'' 
- 
-<code yml> 
-# key/value 쌍. 
-ubuntu_release: "{{ lookup('pipe', 'lsb_release -cs') }}" 
-current_user: "{{ lookup('env', 'USER') }}" 
-vagrant_version: 2.2.10 
-packer_version: 1.6.1 
-... 
-</code> 
- 
-===== shell & command ===== 
-  * [[https://www.mydailytutorials.com/introduction-shell-command-module-ansible/|Introduction to Shell and Command Modules in Ansible - My Daily Tutorials]] 
- 
-===== apt repository ===== 
-  * [[https://linuxhint.com/manage_ubuntu_package_repositories_ppas_ansible/|Manage Ubuntu Package Repositories and PPAs Using Ansible – Linux Hint]] 
- 
-===== 특정 태스크 지정 ===== 
-  * ''%%--start-at-task="태스크이름"%%'' : 해당 태스크 부터 실행 
-  * ''%%--step%%'' : 실행여부 질문 
- 
-===== 참조 ===== 
-  * [[http://knight76.tistory.com/1977|ansible tomcat]] 
-  * [[http://brownbears.tistory.com/358|Ansible이란?]] 
-  * [[https://skyoo2003.github.io/post/2017/11/14/ansible-module-develop|Ansible Module 개발하기 - 📚 Devlog in the SKY 📚]] 
-  * [[http://theeye.pe.kr/archives/2597|Ansible Playbook 정리 | 아이군의 블로그]] 
  
build_deploy_management/ansible.1600092062.txt.gz · 마지막으로 수정됨: 2020/09/14 23:01 저자 kwon37xi