Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 948 Bytes

README.md

File metadata and controls

40 lines (24 loc) · 948 Bytes

change-sshd-port

Change the default SSH port from 22 to whatever the ansible host is configured to use. Copied and modified with permission from https://dmsimard.com/2016/03/15/changing-the-ssh-port-with-ansible/ Modifications include running some of the commands with become, using the ansible_host variable instead of inventory_hostname, and changing a when statement to fix a bug.

For information about PTA and how to use it with this Ansible role please visit https://github.com/Forcepoint/fp-pta-overview/blob/master/README.md

Requirements

Do not run gather_facts when you call this role.

Role Variables

None

Dependencies

None

Example Playbook

- hosts: servers
  gather_facts: no
  roles:
     - { role: change-sshd-port }

Example Hosts file

[webservers]
web01.somedomain.com ansible_port=1234

License

Apache-2.0

Author Information

Jeremy Cornett [email protected]