WEBVTT

1
00:00.000 --> 00:03.800
So friends, to close what I would like to do is to highlight how we can perform

2
00:03.800 --> 00:07.000
this particular task, this time using an answerable role.

3
00:07.000 --> 00:09.000
So with that said, let's just get to it.

4
00:09.000 --> 00:12.000
So once again, we're going to be using the storage role.

5
00:12.000 --> 00:15.350
So if we go back to the documentation that we were looking at before, let me go

6
00:15.350 --> 00:17.000
back to the GitHub page for storage.

7
00:17.000 --> 00:21.260
Now going back down to our storage volumes, previously we saw things such as

8
00:21.260 --> 00:23.000
the name, the disk, the type, that type of thing,

9
00:23.000 --> 00:25.000
as well as the file system type.

10
00:25.000 --> 00:28.970
But if we scroll down a little bit further, notice we have other options such

11
00:28.970 --> 00:33.100
as the mount point, which is going to allow us to specify the directory in
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

11
00:28.970 --> 00:33.100
as the mount point, which is going to allow us to specify the directory in

12
00:33.100 --> 00:35.000
which the file system is going to be mounted.

13
00:35.000 --> 00:39.720
We can also specify things such as mount_user to denote which user is going to

14
00:39.720 --> 00:42.000
be the owner of the mount directory.

15
00:42.000 --> 00:45.770
So all I want to do here is I'm going to quickly write another playbook to

16
00:45.770 --> 00:51.000
perform a similar action, this time just using the actual rail system roles,

17
00:51.000 --> 00:51.000
storage role.

18
00:51.000 --> 00:53.000
So let's go back to our control nodes.

19
00:53.000 --> 00:57.000
And all I will do here is I'll create a playbook called Play4.yml.

20
00:57.000 --> 00:59.990
So let's go into Incent mode, have our three hyphens at the top, you know the

21
00:59.990 --> 01:02.000
drill, let's give it a name, let's say Play4.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

21
00:59.990 --> 01:02.000
drill, let's give it a name, let's say Play4.

22
01:02.000 --> 01:04.000
And I'm just saying mount using storage role.

23
01:04.000 --> 01:08.000
So here we're going to target this time, let's go with the yellow box.

24
01:08.000 --> 01:11.000
We'll have our gather facts configured to be false.

25
01:11.000 --> 01:15.000
And once again, I'm going to define my vars like I did before.

26
01:15.000 --> 01:17.000
So I'm going to specify my storage volumes.

27
01:17.000 --> 01:21.000
And let's just go and see what we're trying to actually mount here.

28
01:21.000 --> 01:24.000
So let's go to the yellow box and I'll do an lsbrk-f.

29
01:24.000 --> 01:28.450
This here is the actual device and we can see the file system happens to be ext

30
01:28.450 --> 01:29.000
4.

31
01:29.000 --> 01:31.670
Now let's just create a little mount point here manually just for some place to
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

31
01:29.000 --> 01:31.670
Now let's just create a little mount point here manually just for some place to

32
01:31.670 --> 01:32.000
there.

33
01:32.000 --> 01:34.000
Let's just call this yellow mount.

34
01:34.000 --> 01:36.000
Okay, so I'll do an ls.

35
01:36.000 --> 01:39.000
This here is going to be the mount point within this particular directory.

36
01:39.000 --> 01:43.000
So let's just give this a name, let's just again say testfs.

37
01:43.000 --> 01:46.000
So the type is going to be a disk.

38
01:46.000 --> 01:51.410
The disks that I'm going to be targeting is again going to be the nvm e zero n

39
01:51.410 --> 01:52.000
two disk.

40
01:52.000 --> 01:55.000
The fs type in this case here is going to be ext4.

41
01:55.000 --> 01:59.380
Now I'm going to specify that the mount points is going to be in the home

42
01:59.380 --> 02:01.000
directory of nugget user.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

42
01:59.380 --> 02:01.000
directory of nugget user.

43
02:01.000 --> 02:04.000
And it's going to be the yellow mount directory I just created.

44
02:04.000 --> 02:07.000
Now again, if I wanted to add in more values, I could.

45
02:07.000 --> 02:09.000
But for now, let's keep this very, very simple.

46
02:09.000 --> 02:14.340
And all I will do is at the same level of indentation as the vars keyword and

47
02:14.340 --> 02:20.000
go to specify my roles and just simply call the rel-system role dot storage.

48
02:20.000 --> 02:22.000
So let's just save this right here.

49
02:22.000 --> 02:24.000
And all I will do is I'll try to run the playbooks.

50
02:24.000 --> 02:26.000
Let's hit enter, give it a moment.

51
02:26.000 --> 02:28.000
And we can see the playbook kicks off.

52
02:28.000 --> 02:31.000
As we can see, we have a change being made to the mount point right here.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

52
02:28.000 --> 02:31.000
As we can see, we have a change being made to the mount point right here.

53
02:31.000 --> 02:32.000
And the playbook completes.

54
02:32.000 --> 02:36.940
Now if I go back to my yellow box right here, if I do an ls blk dash f notice

55
02:36.940 --> 02:38.000
straight away.

56
02:38.000 --> 02:42.000
That the file system has indeed been mounted in the mount points.

57
02:42.000 --> 02:48.000
And if I happen to look at the ls a fsthab file, it has also been modified

58
02:48.000 --> 02:50.000
within this particular file,

59
02:50.000 --> 02:53.000
meaning that it will persist via reboots.

60
02:53.000 --> 02:56.670
So that is how we can mount our file system using the rel-system roles storage

61
02:56.670 --> 02:57.000
role.

62
02:57.000 --> 03:00.000
Let's validate what we've learned within this skill.
