Browse Source

ara and mitogen enabled

master
parent
commit
6a8187fd78
3 changed files with 14 additions and 14 deletions
  1. +5
    -5
      defaults/main.yaml
  2. +3
    -3
      tasks/ara.yaml
  3. +6
    -6
      templates/ansible.cfg.j2

+ 5
- 5
defaults/main.yaml View File

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


ansible_use_ara: false
ansible_use_ara: true
ansible_ara_version: 1.5.7 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_mitogen_pip_package: mitogen


ansible_use_ssh_pipelining: true
ansible_use_ssh_pipelining: false

+ 3
- 3
tasks/ara.yaml View File

@@ -5,7 +5,7 @@
name: "{{ansible_ara_pip_package}}" name: "{{ansible_ara_pip_package}}"
version: "{{ansible_ara_version}}" 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 changed_when: false

+ 6
- 6
templates/ansible.cfg.j2 View File

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

interpreter_python = auto_silent interpreter_python = auto_silent
retry_files_enabled = False
force_handlers = True


library = /usr/share/ansible/library library = /usr/share/ansible/library


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


retry_files_enabled = False
force_handlers = True

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


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


Loading…
Cancel
Save