2018-03-17 03:56:15 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: SHELL | Start ngrok
|
2019-12-31 18:43:43 +07:00
|
|
|
shell: daemonize -l /tmp/ngrok.lock {{ ngrok_path }} http 80 -bind-tls=false
|
2018-03-17 03:56:15 +07:00
|
|
|
failed_when: false
|
|
|
|
changed_when: ngrok.stderr.find("Can't lock the lock file") == -1
|
|
|
|
register: ngrok
|
|
|
|
|
|
|
|
- name: WAIT_FOR | ngrok started
|
|
|
|
wait_for:
|
|
|
|
delay: 2
|
|
|
|
port: 4040
|
|
|
|
when: ngrok.changed
|
|
|
|
|
|
|
|
- name: SHELL | Get ngrok public address
|
2021-09-01 16:02:12 +07:00
|
|
|
shell: set -o pipefail && curl 'http://127.0.0.1:4040/api/tunnels/command_line' 2> /dev/null | jq -r '.public_url' | cut -d '/' -f 3
|
2019-01-24 17:05:46 +07:00
|
|
|
args:
|
2021-09-01 16:02:12 +07:00
|
|
|
executable: /bin/bash
|
2019-01-24 17:05:46 +07:00
|
|
|
warn: false
|
2018-03-17 03:56:15 +07:00
|
|
|
register: ngrok
|
|
|
|
changed_when: false
|
2018-04-20 14:20:39 +07:00
|
|
|
|
|
|
|
- name: LINEINFILE | Tune vimrc
|
|
|
|
lineinfile:
|
|
|
|
line: "set mouse="
|
|
|
|
dest: "{{ item }}/.vimrc"
|
2021-09-01 16:21:12 +07:00
|
|
|
create: true
|
2019-01-24 17:05:46 +07:00
|
|
|
loop:
|
2018-04-20 14:20:39 +07:00
|
|
|
- /root
|
|
|
|
- /home/vagrant
|