반응형

2020/08/14 4

Wordpress 만드는 과정 - 4 (role)

Role? 역할? 알려진 파일구조를 기반으로 특정 var_files, 작업 및 핸들러를 자동으로 로드하는 방법 역할별로 콘텐츠를 그룹화 하면 다른 사용자와 쉽게 역할을 공유할 수 있다. # tree roles [student@controller ~]$ tree roles/ roles/ ├── apache │ ├── handlers │ │ └── main.yaml │ ├── tasks │ │ └── main.yaml │ ├── templates │ │ └── apache.conf.j2 │ └── vars │ └── main.yaml ├── common │ └── tasks │ └── main.yaml ├── haproxy │ ├── handlers │ │ └── main.yaml │ ├── tasks │ ..

Automation/Ansible 2020.08.14

Wordpress 만드는 과정 3 - (변수 및 Jinja2 template)

변수 일부시스템에서 다른동작과 약간 다른 동작이나 구성을 설정하기 위해 따로 설정한다. [student@controller ~]$ tree group_vars/ group_vars/ └── wp ├── apache.yaml ├── haproxy.yaml ├── mariadb.yaml ├── nfs.yaml └── wordpress.yaml 1 directory, 5 files # apache.yaml apache: port: 80 php: repo: pkg: "https://rpms.remirepo.net/enterprise/remi-release-7.rpm " # haproxy.yaml haproxy: frontend: port: 80 backend: name: wordpress balance_type..

Automation/Ansible 2020.08.14

Wordpress 만드는 과정 - 2 (AD-HOC, Playbook)

AD-HOC 이란? 명령으로 실행하는 Asible 실행방법 $ ansible -m -a (참고) https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html Introduction to ad-hoc commands — Ansible Documentation An Ansible ad-hoc command uses the /usr/bin/ansible command-line tool to automate a single task on one or more managed nodes. Ad-hoc commands are quick and easy, but they are not reusable. So why learn about ad-hoc comma..

Automation/Ansible 2020.08.14

Wordpress 만드는 과정 - 1 (준비물, inventory, 구성파일)

0. 사전준비 VM 5대 1. Controller ip : 192.168.123.41 2. wordpress1 ip : 192.168.123.51 3. wordpress2 ip : 192.168.123.52 4. db ip : 192.168.123.53 5. haproxy ip : 192.168.123.54 1. Inventory 란? - 데이터 소스를 가리켜 Ansible이 작업 대상으로 지정하는데 사용하는 호스트의 인벤토리를 컴파일 할 수 있다. 2. Inventroy 설정 (참고) https://docs.ansible.com/ansible/latest/plugins/inventory.html Inventory Plugins — Ansible Documentation Inventory plugins ..

Automation/Ansible 2020.08.14
반응형