2
0
mirror of https://github.com/frappe/bench.git synced 2025-02-03 19:38:24 +00:00
bench/playbooks/roles/bench/tasks/change_ssh_port.yml
2018-02-15 17:48:17 +05:30

20 lines
428 B
YAML

---
- name: Change ssh port
gather_facts: false
hosts: localhost
user: root
tasks:
- name: change sshd config
lineinfile: >
dest=/etc/ssh/sshd_config
regexp="^Port"
line="Port {{ ssh_port }}"
state=present
- name: restart ssh
service: name=sshd state=reloaded
- name: Change ansible ssh port to 2332
set_fact:
ansible_ssh_port: '{{ ssh_port }}'
...