일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- yum
- KVM
- Kubernetes
- nfs-provisioner
- port open
- libvirt
- ubuntu
- cloud-init
- k8s
- Ansible
- awx
- Kubeflow
- ceph
- archlinux
- terraform
- repository
- grafana-loki
- Linux
- HTML
- Docker
- golang
- kolla
- OpenStack
- pacman
- cephadm
- kolla-ansible
- Octavia
- ceph-ansible
- i3
- Arch
Archives
- Today
- Total
YJWANG
[Ubuntu] NFS-Server 구축 Ansible Ad-Hoc 본문
Ansible Command 설치
# apt update
# apt install ansible
Ansible Ad-Hoc Command 실행
'/data' 로 NFS dir를 사용한다는 가정하에 구성됐으니 환경에 맞게 변경하여 사용하시기 바랍니다.
Install NFS Package
# ansible -m apt -a 'name=nfs-kernel-server state=present' localhost
Create Directory
# ansible -m file -a 'path=/data state=directory mode=0777' localhost
LineInFIle
# ansible -m lineinfile -a 'path=/etc/exports line="/data *(rw,no_root_squash,sync)"' localhost
Restart nfs-server
# ansible -m systemd -a 'state=restarted name=nfs-server' localhost
Confirm
# exportfs -v
/data <world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)
mount 테스트
# mount -t nfs localhost:/data /mnt
# df -h /mnt
Filesystem Size Used Avail Use% Mounted on
localhost:/data 39G 1.8G 37G 5% /mnt
# umount /mnt
반응형