반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 랜카드인식불량
- docker network
- swapon
- 같은폴더
- yum
- HTTPD
- permission
- nmcli
- pvcreate
- journalctl
- docker
- vagrant kubernetes
- tar
- ansible
- chmod
- 리다이렉션
- 엑셀파일명변경
- vgcreate
- docker image
- newbingai
- 날짜변경
- 프로세스
- firewalld
- ssh
- mount
- M365필터
- Kubernetes
- lvcreate
- chatGPT
- MSBing
Archives
- Today
- Total
becool
20210730 (금) playbook 연습장 본문
반응형
[user@ansible-server work]$ cat 111.yml
---
- name: no name
hosts: 1s
become: true
tasks:
- name: do something
yum:
name:
- mariadb
- mariadb-server
state: latest
notify : installed
handlers:
- name: installed
service:
name: mariadb
state: started
enabled: true
notify: started
- name: started
firewalld:
service: mysql
state: enabled
permanent: true
immediate: true
▶ 핸들러 연습 : mariadb, mariadb-server 두개의 패키지를 yum 모듈을 통해 설치하고, 정상적으로 설치되었으면 첫번째 핸들러를 통해 mariadb 서비스를 시작하고, mariadb가 정상적으로 시작되면 방화벽설정을 런타임/퍼머넌트 모두 설정 (호스트는 hosts파일에 정의된 1s)
728x90
728x90
'ansible' 카테고리의 다른 글
20210803 (화) ansible 작업제어 #2 (0) | 2021.08.03 |
---|---|
20210802 (월) ansible 작업제어 #1 (0) | 2021.08.02 |
20210730 (금) ansible 조건문, 블록, 핸들러 (0) | 2021.07.30 |
20210729 (목) ansible 변수, 반복문, 조건문 (0) | 2021.07.29 |
20210728 (수) playbook 변수 실습 (0) | 2021.07.28 |
Comments