Skip to content

Ansible timeout fix #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions operations/_scripts/ansible/wait-for-inventory-hosts.py

This file was deleted.

183 changes: 0 additions & 183 deletions operations/_scripts/ansible/wait-for-it.sh

This file was deleted.

4 changes: 4 additions & 0 deletions operations/deployment/ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ roles_path=roles/
inventory=../terraform/inventory.yaml
host_key_checking = False
transport = ssh
callbacks_enabled = ansible.posix.profile_tasks

[callback_profile_tasks]
sort_order = none

[ssh_connection]

Expand Down

This file was deleted.

12 changes: 10 additions & 2 deletions operations/deployment/ansible/playbook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
- hosts: bitops_servers
- name: Ensure hosts is up and running
hosts: bitops_servers
gather_facts: no
tasks:
- name: Wait for hosts to come up
wait_for_connection:
timeout: 300

- name: Ansible tasks
hosts: bitops_servers
become: true
tasks:
- name: Include install
Expand All @@ -12,6 +21,5 @@
- name: Mount efs
include_tasks: tasks/mount.yml
when: mount_efs

- name: Include start
include_tasks: tasks/start.yml
4 changes: 2 additions & 2 deletions operations/deployment/ansible/tasks/fetch.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# copy the repo code to the VM
- name: syncrhonize repo
- name: Synchronize repo
ansible.posix.synchronize:
src: "{{ lookup('ansible.builtin.env', 'BITOPS_OPSREPO_ENVIRONMENT_DIR') }}/app/{{ app_repo_name }}"
dest: "{{ app_install_root }}"
Expand All @@ -8,7 +8,7 @@
- ansible.builtin.debug:
var: synchro_repo_output

- name: copy the .env file
- name: Copy the .env file
copy:
src: "{{ lookup('ansible.builtin.env', 'BITOPS_OPSREPO_ENVIRONMENT_DIR') }}/app.env"
dest: "{{ app_install_root }}/{{ app_repo_name }}/.env"
Expand Down
2 changes: 1 addition & 1 deletion operations/deployment/ansible/tasks/umount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
path: "{{ app_install_root }}/{{ app_repo_name }}/{{ application_mount_target }}/"
register: check_efs_mount

- name: stat test
- name: Stat test
debug:
msg: "The file or directory exists"
when: check_efs_mount.stat.exists
Expand Down