Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.aix_inittab
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
action string |
| Action what the init has to do with this entry. |
command string / required | What command has to run. | |
insertafter string | After which inittabline should the new entry inserted. | |
name string / required | Name of the inittab entry. aliases: service | |
runlevel string / required | Runlevel of the entry. | |
state string |
| Whether the entry should be present or absent in the inittab file. |
Note
lsitab
, chitab
, mkitab
or rmitab
commands.# Add service startmyservice to the inittab, directly after service existingservice. - name: Add startmyservice to inittab community.general.aix_inittab: name: startmyservice runlevel: 4 action: once command: echo hello insertafter: existingservice state: present become: yes # Change inittab entry startmyservice to runlevel "2" and processaction "wait". - name: Change startmyservice to inittab community.general.aix_inittab: name: startmyservice runlevel: 2 action: wait command: echo hello state: present become: yes - name: Remove startmyservice from inittab community.general.aix_inittab: name: startmyservice runlevel: 2 action: wait command: echo hello state: absent become: yes
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
changed boolean | always | Whether the inittab changed or not Sample: True |
msg string | changed | Action done with the inittab entry Sample: changed inittab entry startmyservice |
name string | always | Name of the adjusted inittab entry Sample: startmyservice |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/aix_inittab_module.html