New in version 2.3.
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 |
# 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
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
msg | action done with the inittab entry | changed | string | changed inittab entry startmyservice |
changed | whether the inittab changed or not | always | boolean | True |
name | name of the adjusted inittab entry | always | string | startmyservice |
Note
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–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/aix_inittab_module.html