New in version 2.3.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| action required |
| Action what the init has to do with this entry. |
| command required | What command has to run. | |
| insertafter | After which inittabline should the new entry inserted. | |
| name required | Name of the inittab entry. aliases: service | |
| runlevel required | Runlevel of the entry. | |
| state |
| 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
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
aix_inittab:
name: startmyservice
runlevel: 2
action: wait
command: echo hello
state: present
become: yes
- name: Remove startmyservice from inittab
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 |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/aix_inittab_module.html