[Ansible] AWX 설치하기
DevOps/Ansible2022. 4. 21. 17:26[Ansible] AWX 설치하기

✔️ AWX란 ? Ansible 위에 구축된 웹 기반의 인터페이스이다. AWX의 목적은 플레이북의 실행과 모니터링이다. ✔️ Docker 설치 Docker를 이용해 AWX를 설치해보자 우선 Docker를 설치하고 Docker-Compose를 설치한 뒤 AWX를 설치할 것이다. 사용할 환경은 CentOS 운영체제이며 Docker가 설치되어 있지 않다면 다음 명령을 이용해 Docker를 설치하자 Install Docker Engine on CentOS docs.docker.com 공식 문서는 위와 같다. 아래 명령어를 순서대로 입력하면 도커 설치가 완료된다. sudo yum -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com..

DevOps/Ansible2022. 4. 21. 00:16[Ansible] artifact 재사용 - 역할(roles)

✔️ artifact 재사용 - 역할 Roles — Ansible Documentation Role dependencies let you automatically pull in other roles when using a role. Ansible does not execute role dependencies when you include or import a role. You must use the roles keyword if you want Ansible to execute role dependencies. Role dependencies docs.ansible.com 역할이 정의되어 있는 파일의 구조를 tree 명령어로 확인해보자 [vagrant@controller 0419]$ tree . ├── ..

[Ansible] artifact 재사용 - 파일 재사용 (2)
DevOps/Ansible2022. 4. 20. 23:49[Ansible] artifact 재사용 - 파일 재사용 (2)

✔️ 작업 재사용 Re-using Ansible artifacts — Ansible Documentation Re-using Ansible artifacts You can write a simple playbook in one very large file, and most users learn the one-file approach first. However, breaking tasks up into different files is an excellent way to organize complex sets of tasks and reuse them. Small docs.ansible.com [vagrant@controller 09_artifact_tasks]$ ansible-doc -l | grep i..

DevOps/Ansible2022. 4. 20. 22:23[Ansible] 작업 제어 (Task Controll)

✔️ 작업 제어 ✔️ step 특정 작업에서 오류가 나는데 해결이 안되거나 이전 작업에서 영향이 있는 것 같다고 판단했을 때 step을 이용해 한 줄씩 실행하면서 확인 해볼 수 있다. [vagrant@controller 06_tags]$ ansible-playbook test.yaml --step PLAY [play1] **************************************************************************************************************************************************************************************************************************..

DevOps/Ansible2022. 4. 19. 23:48[Ansible] 조건문(Conditionals)

✔️ 조건문 Conditionals — Ansible Documentation In a playbook, you may want to execute different tasks, or have different goals, depending on the value of a fact (data about the remote system), a variable, or the result of a previous task. You may want the value of some variables to depend on the value docs.ansible.com 조건문은 Jinja(템플릿에 사용하는 포맷) 구문이다. 작업에서 when 키워드를 사용하며 조건을 정의하고 test, filter 키워드를 사용한..

DevOps/Ansible2022. 4. 19. 23:41[Ansible] 반복문(Loops)

✔️ 반복문 Loops — Ansible Documentation Loops Ansible offers the loop, with_ , and until keywords to execute a task multiple times. Examples of commonly-used loops include changing ownership on several files and/or directories with the file module, creating multiple users with the user module, a docs.ansible.com ✔️ 반복문의 키워드 Task 레벨에서 쓸 수 있는 키워드로 Play 레벨에서는 반복 키워드가 없어 반복문을 사용할 수 없다. loop until with_..

image