Created
March 2, 2024 00:54
-
-
Save mkanoor/85b60d441eadf4a350fa303a8d1e0d56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: localhost | |
| user: root | |
| connection: local | |
| gather_facts: no | |
| vars: | |
| key_file: /tmp/testing.key | |
| key_pass_phrase: passphrase | |
| tasks: | |
| - name: add identity | |
| expect: | |
| command: ssh-add "{{ key_file }}" | |
| responses: | |
| passphrase: "{{ key_pass_phrase }}" | |
| when: key_pass_phrase != None | |
| - name: Git Clone | |
| ansible.builtin.git: | |
| repo: git@github.com:mkanoor/eda-project.git | |
| dest: /tmp/myclone2 | |
| key_file: "{{ key_file }}" | |
| - name: remove identity | |
| command: ssh-add -D "{{ key_file }}" | |
| when: key_pass_phrase != None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment