-2

tried 2 ways:

  • use submodules, but how do I do checkout?

  • use git module ansible, but credentials for Source Control and Machine this is a different access. And user for ssh Machine does not have access to the git repository.

  • Why do you need to put in role's file directory ? Simply put it in the files directory adjacent to your playbook. – Zeitounator Jul 28 '20 at 14:49
  • because files are edited in a different git repository. and I need to get the latest version of them. – Alexander Balandin Jul 29 '20 at 05:16
  • You can create a role which only contains the files in this case. But your use case looks really weird... – Zeitounator Jul 29 '20 at 06:08
  • for example, I need to install and copy the configuration for the app, and the configuration itself is located in the app's git repository – Alexander Balandin Jul 29 '20 at 08:57
  • Why would you want to copy that inside a role then ? Put that info in your project using the role, or in your inventory. As a very generic entry point to the subject: https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html – Zeitounator Jul 29 '20 at 08:58

1 Answers1

0

For this, we use curl (on pipeline)

curl --header "your's authent" -s -o "named_file" "https://your's_git/path_of_file/raw"

with ansible, you can use get_url source https://docs.ansible.com/ansible/latest/modules/get_url_module.html

Derioss
  • 86
  • 4