I would like to use ansible to change some things, when I setup a new server.
For this I would need to change for example SSH port.
Using ansible to change the SSH port from default isn't hard:
- name: Setup selinux for alternate SSH port
seport:
ports: "2222"
proto: "tcp"
setype: "ssh_port_t"
state: "present"
How to use ansible and self update the SSH port now for this host in my inventory file, so on next time I run a playbook on this host I won't need to change SSH port manually. All I found using google were bad solutions.
-All the best;