aix_inittab - Manages the inittab on AIX.
New in version 2.3.
Synopsis
- Manages the inittab on AIX.
Requirements (on host that executes module)
- itertools
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
action | yes |
| Action what the init has to do with this entry. | |
command | yes | What command has to run. | ||
insertafter | no | After which inittabline should the new entry inserted. | ||
name | yes | Name of the inittab entry. aliases: service | ||
runlevel | yes | Runlevel of the entry. | ||
state | no | present |
| Whether the entry should be present or absent in the inittab file |
Examples
# 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 # Remove inittab entry startmyservice. - name: remove startmyservice from inittab aix_inittab: name: startmyservice runlevel: 2 action: wait command: "echo hello" state: absent become: yes
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
changed | whether the inittab changed or not | always | boolean | True |
msg | action done with the inittab entry | changed | string | changed inittab entry startmyservice |
name | name of the adjusted inittab entry | always | string | startmyservice |
Notes
Note
- The changes are persistent across reboots, you need root rights to read or adjust the inittab with the lsitab, chitab, mkitab or rmitab commands.
- tested on AIX 7.1.
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/aix_inittab_module.html