From cb90399e47e27bab3e19545bc3fa2d5a690003a5 Mon Sep 17 00:00:00 2001 From: kevinnlsamuel Date: Tue, 15 Sep 2026 13:32:29 +0530 Subject: [PATCH] role: check git connections --- roles/testgitconn/meta/main.yml | 35 ++++++++++++++++++++++++++++++++ roles/testgitconn/tasks/main.yml | 8 ++++++++ 2 files changed, 43 insertions(+) create mode 100644 roles/testgitconn/meta/main.yml create mode 100644 roles/testgitconn/tasks/main.yml diff --git a/roles/testgitconn/meta/main.yml b/roles/testgitconn/meta/main.yml new file mode 100644 index 0000000..36b9858 --- /dev/null +++ b/roles/testgitconn/meta/main.yml @@ -0,0 +1,35 @@ +#SPDX-License-Identifier: MIT-0 +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/roles/testgitconn/tasks/main.yml b/roles/testgitconn/tasks/main.yml new file mode 100644 index 0000000..82436af --- /dev/null +++ b/roles/testgitconn/tasks/main.yml @@ -0,0 +1,8 @@ +- name: check connection to hosted git servers + loop: + - github.com + - gitea.kevinnlsamuel.com + changed_when: false + ansible.builtin.shell: > + ssh -T git@{{item}} 2>&1 | grep -qF 'successfully authenticated' +