add wait for ssh to the playbook
This commit is contained in:
parent
e2423e7e92
commit
df40793c12
2 changed files with 10 additions and 2 deletions
ansible
|
@ -1,5 +1,6 @@
|
||||||
[defaults]
|
[defaults]
|
||||||
inventory = inventory.yml
|
inventory = inventory.yml
|
||||||
|
interpreter_python = /usr/bin/python3
|
||||||
|
|
||||||
remote_user = andrei
|
remote_user = andrei
|
||||||
private_key_file = id_ed25519_yatf
|
private_key_file = id_ed25519_yatf
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
---
|
---
|
||||||
|
- name: Wait for ssh
|
||||||
|
gather_facts: false
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: check 22/tcp
|
||||||
|
ansible.builtin.wait_for:
|
||||||
|
port: 22
|
||||||
|
connect_timeout: 30
|
||||||
|
|
||||||
- name: Configure nginx
|
- name: Configure nginx
|
||||||
become: true
|
become: true
|
||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: install nginx
|
- name: install nginx
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue