LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-27-2018, 04:14 AM   #1
1s440
Member
 
Registered: Mar 2018
Posts: 266

Rep: Reputation: Disabled
partition playbook


Hi all,

Below is the playbook that i have created for the partition creation and mounting the filesystems. Please let me know if this is correct.

---
hosts: server3
tasks:
- name: Create a new partition
- parted:
device: /dev/sdb,/dev/sdc
number: 1
flags: [ lvm ]
state: present
dev: /dev/sdb1, /dev/sdc1
become: yes
- name: make filesystems...
filesystem:
fstype: ext4
dev: /dev/sdb1
become: yes
- name: make filesystems...
filesystem:
fstype: ext4
dev: /dev/sdc1
become: yes
- name: Creates directory
file:
path: /test1/data
state: directory
owner: root
group: root
mode: 0755
- name: Mounting Filesystem
mount:
path: /lsrkb
src: /dev/sdb1
fstype: ext4
state: mounted
- name: Mounting Filesystem
mount:
path: /test1/data
src: /dev/sdc1
fstype: ext4
state: mounted
- name: mount all
command: mount -a
args:
warn: no
become: true

Last edited by 1s440; 04-27-2018 at 04:16 AM.
 
Old 04-27-2018, 09:35 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,384
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
It seems a logical sequence, but it's difficult to decide whether it's "right" or "wrong" in the absence of context. As it stands, it looks more like a "to do" list than a procedure.

Is this at installation and, if so, installation of what?

Are you using a GUI program or a command line program; which one(s)?

And so on.
 
Old 04-30-2018, 04:27 AM   #3
1s440
Member
 
Registered: Mar 2018
Posts: 266

Original Poster
Rep: Reputation: Disabled
Hi,

This is not for installation. I am trying to create partitions using lvm and also add entry to the fstab.
I am using CLI mode.

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using passwords in ansible playbook pgb205 Linux - Server 1 12-27-2016 12:20 AM
ansible will not execute whole playbook DimTheo Linux - Server 1 11-23-2016 11:59 PM
LXer: U.S. Digital Services and Playbook: LXer Syndicated Linux News 0 08-20-2014 09:31 PM
Strongswan & Playbook issues. zinv Linux - Networking 0 04-12-2012 12:01 PM
Playbook from R.I.M. -- with QNX mjolnir General 0 09-28-2010 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration