mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Add playbook to install mitogen (#3622)
This commit is contained in:
5
Makefile
Normal file
5
Makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
mitogen:
|
||||||
|
ansible-playbook -c local mitogen.yaml -vv
|
||||||
|
clean:
|
||||||
|
rm -rf dist/
|
||||||
|
rm *.retry
|
||||||
@@ -3,6 +3,8 @@ pipelining=True
|
|||||||
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
|
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
|
||||||
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
|
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
|
||||||
[defaults]
|
[defaults]
|
||||||
|
strategy_plugins = plugins/mitogen/ansible_mitogen/plugins/strategy
|
||||||
|
|
||||||
host_key_checking=False
|
host_key_checking=False
|
||||||
gathering = smart
|
gathering = smart
|
||||||
fact_caching = jsonfile
|
fact_caching = jsonfile
|
||||||
|
|||||||
30
mitogen.yaml
Normal file
30
mitogen.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
strategy: linear
|
||||||
|
vars:
|
||||||
|
mitogen_version: master
|
||||||
|
mitogen_url: https://github.com/dw/mitogen/archive/{{mitogen_version}}.zip
|
||||||
|
tasks:
|
||||||
|
- name: Create mitogen plugin dir
|
||||||
|
file:
|
||||||
|
path: "{{item}}"
|
||||||
|
state: directory
|
||||||
|
become: false
|
||||||
|
loop:
|
||||||
|
- "{{playbook_dir}}/plugins/mitogen"
|
||||||
|
- "{{playbook_dir}}/dist"
|
||||||
|
|
||||||
|
- name: download mitogen release
|
||||||
|
get_url:
|
||||||
|
url: "{{mitogen_url}}"
|
||||||
|
dest: "{{playbook_dir}}/dist/mitogen_{{mitogen_version}}.zip"
|
||||||
|
validate_certs: true
|
||||||
|
|
||||||
|
- name: extract zip
|
||||||
|
unarchive:
|
||||||
|
src: "{{playbook_dir}}/dist/mitogen_{{mitogen_version}}.zip"
|
||||||
|
dest: "{{playbook_dir}}/dist/"
|
||||||
|
|
||||||
|
- name: copy plugin
|
||||||
|
synchronize:
|
||||||
|
src: "{{playbook_dir}}/dist/mitogen-{{mitogen_version}}/"
|
||||||
|
dest: "{{playbook_dir}}/plugins/mitogen"
|
||||||
Reference in New Issue
Block a user