Skip to content

Commit 1aa784f

Browse files
committed
Improved and updated documentation for the role.
1 parent 8c9c4ee commit 1aa784f

File tree

1 file changed

+39
-22
lines changed

1 file changed

+39
-22
lines changed

README.md

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@ To increase security for access to the system in QEMU, you can specify a whiteli
2323
## Requirements
2424

2525
Linux system Debian or CentOS.
26-
Installed packages:
26+
Installed packages on target hosts:
2727
- python3
2828
- python3-apt
29+
30+
Installed packages on the control node (Ansible):
31+
- rsync
32+
- sshpass
33+
If you use password login to target hosts via `ssh`
2934

3035
## Variables
3136

32-
See the `defaults/main.yml` and examples in vars:
37+
See the [`defaults/main.yml`](defaults/main.yml) and examples in vars:
3338

3439
lisoq_qemu_enable: false
3540
Do I need to use and run QEMU. Without this option, the role can download the ISO image and configure the firewall.
@@ -83,10 +88,20 @@ You can specify your own list of block devices:
8388
<br>
8489

8590
lisoq_qemu_exclude_disk:
86-
- 'fd0'
87-
- 'sr0'
91+
- 'fd0'
92+
- 'sr0'
8893

8994
List of block disk devices to be excluded from the `lisoq_qemu_disk` list. The exclusion list usually contains FDD and CD-ROM devices.
95+
You can override the variable yourself and add your own block devices to the exclusion list.
96+
97+
lisoq_qemu_exclude_disk_regular_list:
98+
- 'fd'
99+
- 'sr'
100+
- 'dm-'
101+
- 'loop'
102+
103+
A list of block devices without a numeric suffix to be excluded from the list for intra-OS connection in QEMU.
104+
Based on the `lisoq_qemu_exclude_disk_regular_list` variable inside the role, a regular expression will be generated.
90105

91106
lisoq_qemu_boot_cd: true
92107
Whether to boot QEMU from CD-ROM (from our downloaded ISO image file `lisoq_iso_file_...` ).
@@ -112,24 +127,27 @@ Sshd port that accepts connections _inside_ ISO image.
112127
lisoq_ramdisk_enable: false
113128
Use (and create) RAM-disk partitions on the target system (before running QEMU).
114129

115-
lisoq_ramdisk_location: '/mnt'
130+
lisoq_ramdisk_path: '/mnt'
116131
The preferred path for the RAM-disk partition.
117132

118-
lisoq_ramdisk_another_location: '/tmp'
133+
lisoq_ramdisk_another_path: '/tmp'
119134
The alternative path for a RAM-disk partition if it is already in use internally. Subsequently, we will expand it to the desired size.
120135

121-
lisoq_ramdisk_existed: false
122-
Detect flag if RAM-disk partition is already in use. Service (local) variable.
123-
124-
lisoq_ramdisk_mounted: false
125-
Detect flag if RAM-disk partition is already in mounted. Service (local) variable.
126-
127-
lisoq_ramdisk_size: '300'
136+
lisoq_ramdisk_size: '250'
128137
The size of the RAM-disk partition in MiB (mebibytes).
129138

130-
lisoq_total_need_ram: "( {{ lisoq_ramdisk_size | int + lisoq_qemu_ram | int }} | default('300') )"
139+
lisoq_total_need_ram: '' # (lisoq_ramdisk_size + lisoq_qemu_ram) or min 250MiB - autodetect
131140
The minimum amount of RAM on the target system in MiB (mebibytes). The sum of two components - `lisoq_ramdisk_size` and `lisoq_qemu_ram`.
132141

142+
lisoq_ramdisk_package_enable: false
143+
Create a RAM disk to store packages on the system in directory `/var/cache/yum` or `/var/cache/apt`. Not all LiveCD systems have extra 200-400 MB to store the package base, that's why we use RAM-disk.
144+
145+
lisoq_ramdisk_package_size: '' # in MiB (mebibyte) - autodetect
146+
The amount of MB of RAM that we can allocate for the correct installation of packages on the system. Empirically, it was found that you need a minimum of 300 MB. Afterwards, we can clean up this directory.
147+
148+
lisoq_ramdisk_package_purge: false
149+
Clean up the packages directory. Use this option very carefully if you have to install additional packages to the system after completing the role.
150+
133151
lisoq_firewall_acl_enable: false
134152
Allow ACLs to whitelist IP's/net's and some listening ports (for example, `{{ lisoq_qemu_args_port_ssh }}` and `{{ lisoq_qemu_args_port_vnc }}`). Connections from other IPs to these ports are dropped. Whitelists are separate for IPv4 and IPv6 networks.
135153

@@ -141,12 +159,6 @@ Default white list for IPv4 networks.
141159
- '::1/128'
142160
Default white list for IPv6 networks.
143161

144-
lisoq_firewall_acl_ports:
145-
- '{{ lisoq_qemu_args_port_ssh | default(omit) }}'
146-
- '{{ lisoq_qemu_args_port_rdp | default(omit) }}'
147-
- '{{ lisoq_qemu_args_port_vnc | default(omit) }}'
148-
Default port ACL for a firewall.
149-
150162
lisoq_qemu_args: '
151163
-net nic
152164
-rtc base=localtime
@@ -164,7 +176,7 @@ List of required command line arguments to run QEMU.
164176
shell> ansible-galaxy role install click0.linux_run_iso_in_qemu
165177
```
166178

167-
2) Look variables, e.g. in `defaults/main.yml`
179+
2) Look variables, e.g. in [`defaults/main.yml`](defaults/main.yml)
168180

169181
You can override them in the playbook and inventory.
170182

@@ -182,6 +194,11 @@ You can override them in the playbook and inventory.
182194
lisoq_qemu_enable: true
183195
lisoq_qemu_static_custom_enable: true
184196
lisoq_iso_file_url: 'https://mfsbsd.vx.sk/files/iso/12/amd64/mfsbsd-12.2-RELEASE-amd64.iso'
197+
lisoq_qemu_vnc_type: 'share'
198+
lisoq_qemu_boot_once_cd: false
199+
lisoq_qemu_ram: '650'
200+
lisoq_ramdisk_package_enable: false
201+
lisoq_ramdisk_package_purge: false
185202
lisoq_firewall_acl_ipv4_white:
186203
- '127.0.0.0/8'
187204
- '10.0.0.0/8'
@@ -216,7 +233,6 @@ You can override them in the playbook and inventory.
216233

217234
- [ ] Test on a Linux LiveCD based:
218235
- Debian
219-
- CentOS
220236
- Rocky Linux
221237
- Alpine
222238
- ArchLinux
@@ -226,6 +242,7 @@ You can override them in the playbook and inventory.
226242
## Tested
227243

228244
- [x] Freshly installed on HDD a Debian "bullseye" 11
245+
- [x] On running from LiveCD Centos 7
229246

230247
## Dependencies
231248

0 commit comments

Comments
 (0)