community.general.aix_inittab module – Manages the inittab on AIX
Note
This module is part of the community.general collection (version 12.6.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.
DEPRECATED
- Removed in:
-
version 15.0.0
- Why:
-
The module is not actively maintained.
- Alternative:
-
Use
ibm.power_aix.inittabinstead. See https://ibm.github.io/ansible-power-aix/modules/inittab.html for details.
Synopsis
- Manages the
inittabon AIX.
Parameters
Parameter | Comments |
|---|---|
action string | Action the Choices:
|
command string / required | Command to be executed. |
insertafter string | After which |
name aliases: service string / required | Name of the |
runlevel string / required | Runlevel of the entry. |
state string | Whether the entry should be present or absent in the Choices:
|
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Returns details on what has changed (or possibly needs changing in |
Notes
Note
- The changes are persistent across reboots.
- You need root rights to read or adjust the
inittabwith thelsitab,chitab,mkitaborrmitabcommands. - Tested on AIX 7.1.
Examples
# 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: true
# 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: true
- name: Remove startmyservice from inittab
community.general.aix_inittab:
name: startmyservice
runlevel: 2
action: wait
command: echo hello
state: absent
become: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
name string | Name of the adjusted Returned: always Sample: |
Status
- This module will be removed in version 15.0.0. [deprecated]
- For more information see DEPRECATED.
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/general/aix_inittab_module.html