LoginSignup
1
1

More than 5 years have passed since last update.

[Ansible]追加Diskマウント

Posted at

使用したモジュール

RHEL 7 の場合

- name: make file system (xfs)
  filesystem: fstype=xfs dev={{ devicename }}

- name: make mount point
  file: path={{ mountpoint }} state=directory

- name: mount disk
  mount: src={{ devicename }} fstype=xfs path={{ mountpoint }} opts=defaults state=mounted

Amazon Linux の場合

- name: make file system (ext4)
  filesystem: fstype=ext4 dev={{ devicename }}

- name: make mount point
  file: path={{ mountpoint }} state=directory

- name: mount disk
  mount: src={{ devicename }} fstype=ext4 path={{ mountpoint }} opts=defaults state=mounted
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1