Open robinvy opened 4 years ago
I could not find any existing inetd module for Ansible. If it is just a matter of modifying /etc/inetd.conf, one could use replace module to change the lines in the file.
Here is an example showing how to disable telnet and ftpd on an AIX system using Ansible replace
and service
core modules.
- hosts: aix
gather_facts: no
handlers:
- name: restart inetd
service: name=inetd state=restarted
tasks:
- name: disable ftpd and telnet
replace:
path: /etc/inetd.conf
regexp: '^(ftp\s|telnet\s)'
replace: '#\1'
backup: yes
owner: root
group: system
mode: 0664
notify: restart inetd
May be good to create a role to ease typical actions.
Can we modify this configuration file?