Skip to Content
Ansible: 시작부터 끝까지, 3판
book

Ansible: 시작부터 끝까지, 3판

by Bas Meijer, Lorin Hochstein, René Moser
May 2025
Beginner to intermediate
472 pages
7h 11m
Korean
O'Reilly Media, Inc.
Book available
Content preview from Ansible: 시작부터 끝까지, 3판

7장. Ansible로 메자닌 배포하기

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

이제 서버에 메자닌을 배포하기 위한 Ansible 플레이북을 작성할 차례입니다. 단계별로 진행하겠지만, 책의 마지막 페이지부터 읽고 어떻게 끝나는지 확인하는 타입이라면 이 장의 마지막에 예제 7-27로 전체 플레이북을 찾을 수 있습니다. GitHub에서도 사용할 수 있습니다. 직접 실행하기 전에 README 파일을 확인하세요.

메자닌의 작가 스티븐 맥도널드가 쓴 원작 대본에 최대한 가깝게 만들려고 노력했습니다.1

플레이북에 작업 나열하기

플레이북의 세부 내용을 살펴보기 전에 전체적인 개요를 살펴봅시다. ansible-playbook 명령줄 도구는 --list-tasks 이라는 플래그를 지원합니다. 이 플래그는 플레이북에 있는 모든 작업의 이름을 인쇄합니다. 사용 방법은 다음과 같습니다:

$ ansible-playbook --list-tasks mezzanine.yml

예제7-1은 예제 7-27의 mezzanine.yml 플레이북에 대한 출력을 보여 줍니다.

예 7-1. 메자닌 플레이북의 작업 목록
 playbook: mezzanine.yml play #1 (web): Deploy mezzanine TAGS: [] tasks: Install apt packages TAGS: [] Create project path TAGS: [] Create a logs directory TAGS: [] Check out the repository on the host TAGS: [] Create python3 virtualenv TAGS: [] Copy requirements.txt to home directory TAGS: [] Install packages listed in requirements.txt TAGS: [] Create project locale TAGS: [] Create a DB user TAGS: [] Create the database TAGS: [] Ensure config path exists TAGS: [] Create tls certificates TAGS: [] Remove the default nginx config file TAGS: [] Set the nginx config file TAGS: [] Enable the nginx config file TAGS: [] Set the supervisor config file TAGS: [] Install poll twitter cron job TAGS: [] Set the gunicorn config file TAGS: [] Generate the settings file TAGS: [] Apply migrations to create the database, collect static content TAGS: [] Set the site id TAGS: [] Set the admin password ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes 오퍼레이터

Kubernetes 오퍼레이터

Jason Dobies, Joshua Wood

Publisher Resources

ISBN: 9798341653900Supplemental Content