| 1 |
.. |
| 2 |
Copyright (c) Ansible Project |
| 3 |
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 4 |
SPDX-License-Identifier: GPL-3.0-or-later |
| 5 |
|
| 6 |
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_properties: |
| 7 |
|
| 8 |
Properties |
| 9 |
---------- |
| 10 |
|
| 11 |
Optionally, in the inventory file ``hosts/02_iocage.yml``, get the iocage properties. Enable |
| 12 |
:ansopt:`community.general.iocage#inventory:get_properties`: |
| 13 |
|
| 14 |
.. code-block:: yaml+jinja |
| 15 |
|
| 16 |
plugin: community.general.iocage |
| 17 |
host: 10.1.0.73 |
| 18 |
user: admin |
| 19 |
get_properties: true |
| 20 |
hooks_results: |
| 21 |
- /var/db/dhclient-hook.address.epair0b |
| 22 |
compose: |
| 23 |
ansible_host: (iocage_hooks.0 == '-') | ternary(iocage_ip4, iocage_hooks.0) |
| 24 |
|
| 25 |
Display the properties. Create the playbook ``pb-test-properties.yml``: |
| 26 |
|
| 27 |
.. code-block:: yaml |
| 28 |
|
| 29 |
- hosts: all |
| 30 |
remote_user: admin |
| 31 |
|
| 32 |
vars: |
| 33 |
|
| 34 |
ansible_python_interpreter: auto_silent |
| 35 |
|
| 36 |
tasks: |
| 37 |
|
| 38 |
- debug: |
| 39 |
var: iocage_properties |
| 40 |
|
| 41 |
Run the playbook. Limit the inventory to *srv_3*: |
| 42 |
|
| 43 |
.. code-block:: console |
| 44 |
|
| 45 |
shell> ansible-playbook -i hosts/02_iocage.yml -l srv_3 pb-test-properties.yml |
| 46 |
|
| 47 |
PLAY [all] ********************************************************************************************************** |
| 48 |
|
| 49 |
TASK [debug] ******************************************************************************************************** |
| 50 |
ok: [srv_3] => |
| 51 |
iocage_properties: |
| 52 |
CONFIG_VERSION: '33' |
| 53 |
allow_chflags: '0' |
| 54 |
allow_mlock: '0' |
| 55 |
allow_mount: '1' |
| 56 |
allow_mount_devfs: '0' |
| 57 |
allow_mount_fdescfs: '0' |
| 58 |
allow_mount_fusefs: '0' |
| 59 |
allow_mount_linprocfs: '0' |
| 60 |
allow_mount_linsysfs: '0' |
| 61 |
allow_mount_nullfs: '0' |
| 62 |
allow_mount_procfs: '0' |
| 63 |
allow_mount_tmpfs: '0' |
| 64 |
allow_mount_zfs: '0' |
| 65 |
allow_nfsd: '0' |
| 66 |
allow_quotas: '0' |
| 67 |
allow_raw_sockets: '0' |
| 68 |
allow_set_hostname: '1' |
| 69 |
allow_socket_af: '0' |
| 70 |
allow_sysvipc: '0' |
| 71 |
allow_tun: '0' |
| 72 |
allow_vmm: '0' |
| 73 |
assign_localhost: '0' |
| 74 |
available: readonly |
| 75 |
basejail: '0' |
| 76 |
boot: '0' |
| 77 |
bpf: '1' |
| 78 |
children_max: '0' |
| 79 |
cloned_release: 14.2-RELEASE |
| 80 |
comment: none |
| 81 |
compression: 'on' |
| 82 |
compressratio: readonly |
| 83 |
coredumpsize: 'off' |
| 84 |
count: '1' |
| 85 |
cpuset: 'off' |
| 86 |
cputime: 'off' |
| 87 |
datasize: 'off' |
| 88 |
dedup: 'off' |
| 89 |
defaultrouter: auto |
| 90 |
defaultrouter6: auto |
| 91 |
depends: none |
| 92 |
devfs_ruleset: '4' |
| 93 |
dhcp: '1' |
| 94 |
enforce_statfs: '2' |
| 95 |
exec_clean: '1' |
| 96 |
exec_created: /usr/bin/true |
| 97 |
exec_fib: '0' |
| 98 |
exec_jail_user: root |
| 99 |
exec_poststart: /usr/bin/true |
| 100 |
exec_poststop: /usr/bin/true |
| 101 |
exec_prestart: /usr/bin/true |
| 102 |
exec_prestop: /usr/bin/true |
| 103 |
exec_start: /bin/sh /etc/rc |
| 104 |
exec_stop: /bin/sh /etc/rc.shutdown |
| 105 |
exec_system_jail_user: '0' |
| 106 |
exec_system_user: root |
| 107 |
exec_timeout: '60' |
| 108 |
host_domainname: none |
| 109 |
host_hostname: srv-3 |
| 110 |
host_hostuuid: srv_3 |
| 111 |
host_time: '1' |
| 112 |
hostid: ea2ba7d1-4fcd-f13f-82e4-8b32c0a03403 |
| 113 |
hostid_strict_check: '0' |
| 114 |
interfaces: vnet0:bridge0 |
| 115 |
ip4: new |
| 116 |
ip4_addr: none |
| 117 |
ip4_saddrsel: '1' |
| 118 |
ip6: new |
| 119 |
ip6_addr: none |
| 120 |
ip6_saddrsel: '1' |
| 121 |
ip_hostname: '0' |
| 122 |
jail_zfs: '0' |
| 123 |
jail_zfs_dataset: iocage/jails/srv_3/data |
| 124 |
jail_zfs_mountpoint: none |
| 125 |
last_started: '2025-06-11 04:29:23' |
| 126 |
localhost_ip: none |
| 127 |
login_flags: -f root |
| 128 |
mac_prefix: 02a098 |
| 129 |
maxproc: 'off' |
| 130 |
memorylocked: 'off' |
| 131 |
memoryuse: 'off' |
| 132 |
min_dyn_devfs_ruleset: '1000' |
| 133 |
mount_devfs: '1' |
| 134 |
mount_fdescfs: '1' |
| 135 |
mount_linprocfs: '0' |
| 136 |
mount_procfs: '0' |
| 137 |
mountpoint: readonly |
| 138 |
msgqqueued: 'off' |
| 139 |
msgqsize: 'off' |
| 140 |
nat: '0' |
| 141 |
nat_backend: ipfw |
| 142 |
nat_forwards: none |
| 143 |
nat_interface: none |
| 144 |
nat_prefix: '172.16' |
| 145 |
nmsgq: 'off' |
| 146 |
notes: none |
| 147 |
nsem: 'off' |
| 148 |
nsemop: 'off' |
| 149 |
nshm: 'off' |
| 150 |
nthr: 'off' |
| 151 |
openfiles: 'off' |
| 152 |
origin: readonly |
| 153 |
owner: root |
| 154 |
pcpu: 'off' |
| 155 |
plugin_name: none |
| 156 |
plugin_repository: none |
| 157 |
priority: '99' |
| 158 |
pseudoterminals: 'off' |
| 159 |
quota: none |
| 160 |
readbps: 'off' |
| 161 |
readiops: 'off' |
| 162 |
release: 14.2-RELEASE-p3 |
| 163 |
reservation: none |
| 164 |
resolver: /etc/resolv.conf |
| 165 |
rlimits: 'off' |
| 166 |
rtsold: '0' |
| 167 |
securelevel: '2' |
| 168 |
shmsize: 'off' |
| 169 |
source_template: ansible_client |
| 170 |
stacksize: 'off' |
| 171 |
state: up |
| 172 |
stop_timeout: '30' |
| 173 |
swapuse: 'off' |
| 174 |
sync_state: none |
| 175 |
sync_target: none |
| 176 |
sync_tgt_zpool: none |
| 177 |
sysvmsg: new |
| 178 |
sysvsem: new |
| 179 |
sysvshm: new |
| 180 |
template: '0' |
| 181 |
type: jail |
| 182 |
used: readonly |
| 183 |
vmemoryuse: 'off' |
| 184 |
vnet: '1' |
| 185 |
vnet0_mac: 02a0983da05d 02a0983da05e |
| 186 |
vnet0_mtu: auto |
| 187 |
vnet1_mac: none |
| 188 |
vnet1_mtu: auto |
| 189 |
vnet2_mac: none |
| 190 |
vnet2_mtu: auto |
| 191 |
vnet3_mac: none |
| 192 |
vnet3_mtu: auto |
| 193 |
vnet_default_interface: auto |
| 194 |
vnet_default_mtu: '1500' |
| 195 |
vnet_interfaces: none |
| 196 |
wallclock: 'off' |
| 197 |
writebps: 'off' |
| 198 |
writeiops: 'off' |
| 199 |
|
| 200 |
PLAY RECAP ********************************************************************************************************** |
| 201 |
srv_3 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |