浏览代码

ara and mitogen enabled

master
父节点
当前提交
6a8187fd78
共有 3 个文件被更改,包括 14 次插入14 次删除
  1. +5
    -5
      defaults/main.yaml
  2. +3
    -3
      tasks/ara.yaml
  3. +6
    -6
      templates/ansible.cfg.j2

+ 5
- 5
defaults/main.yaml 查看文件

@@ -1,12 +1,12 @@
ansible_version: 5.0.1
ansible_pip_package: ansible

ansible_use_ara: false
ansible_use_ara: true
ansible_ara_version: 1.5.7
ansible_ara_pip_package: ara
ansible_ara_pip_package: ara[server]

ansible_use_mitogen: false
ansible_mitogen_version: 0.3.0
ansible_use_mitogen: true
ansible_mitogen_version: 0.3.2
ansible_mitogen_pip_package: mitogen

ansible_use_ssh_pipelining: true
ansible_use_ssh_pipelining: false

+ 3
- 3
tasks/ara.yaml 查看文件

@@ -5,7 +5,7 @@
name: "{{ansible_ara_pip_package}}"
version: "{{ansible_ara_version}}"

- name: get ara location
shell: python3 -c "import os,ara; print(os.path.dirname(ara.__file__))"
register: _ara_location
- name: get ara ansible config
shell: python3 -m ara.setup.ansible
register: _ara_config
changed_when: false

+ 6
- 6
templates/ansible.cfg.j2 查看文件

@@ -1,25 +1,25 @@
[defaults]
nocows = 1
stdout_callback = yaml

interpreter_python = auto_silent
retry_files_enabled = False
force_handlers = True

library = /usr/share/ansible/library

{% if ansible_use_mitogen %}
# mitogen config
strategy_plugins = {{ _ansible_mitogen_location.stdout }}/plugins/strategy
strategy = mitogen_linear
{% endif %}

retry_files_enabled = False
force_handlers = True

{% if ansible_use_ara %}
callback_plugins = {{ _ara_location.stdout }}/plugins/callbacks
# ara config
{{ _ara_config.stdout_lines[1:] | join("\n") }}
{% endif %}

{% if not ansible_use_mitogen %}
[ssh_connection]
{% if not ansible_use_mitogen %}
{% if ansible_use_ssh_pipelining %}
pipelining = True
{% endif %}


正在加载...
取消
保存