GitHub リポジトリをクローンして、 git remote add upstream した状態にしたいときは、 remote: upstream を指定すれば良い。例えば、 git@github.com:example/example.git を clone することを考えると、 ansible を次のように書けば OK。
---
- name: clone repository
become: yes
become_user: maintainer
git:
repo: git@github.com:example/example.git
dest: /path/to/repos
remote: upstream
accept_hostkey: yes
when: not check_repos.stat.exists
詳細は Ansible 公式ドキュメント git module を参照してください。
Pinned Articles
About
ウェブ界隈でエンジニアとして労働活動に励んでいる @gomi_ningen 個人のブログです
Tags
LLM
promptfoo
GenAI
JavaScript
PowerShell
kibana
fluentd
elasticsearch
nginx
村川梨衣
五十嵐裕美
イベント
logrotate
IoT
Java
Scala
iputils
C言語
ICMP
WUG
mastodon
Swift
AWS
Clock
Windows
アーキテクチャ
PoEAA
iOS
DeviceFarm
プログラミング言語
OS
Lambda
StepFunctions
Serverless
terraform
ポエム
RHEL
ネットワーク
GraphQL
CloudWatch
Linux
Coreutils
telnet
network
nc
LinuxKernel
fpinscala
ELB
IAM
AppSync