@@ -0,0 +1,3 @@ | |||||
ansible_use_ara: false | |||||
ansible_use_mitogen: true | |||||
ansible_with_ovh_module: true |
@@ -1,6 +1,6 @@ | |||||
--- | --- | ||||
- name: install ansible via pip | |||||
- name: ansible pip package | |||||
pip: | pip: | ||||
name: ansible | name: ansible | ||||
state: latest | state: latest |
@@ -1,11 +1,11 @@ | |||||
--- | --- | ||||
- name: Install ARA with pip | |||||
- name: ara pip package | |||||
pip: | pip: | ||||
name: ara | name: ara | ||||
state: present | state: present | ||||
- name: Get ARA's installed location | |||||
- name: get ara location | |||||
shell: python -c "import os,ara; print(os.path.dirname(ara.__file__))" | shell: python -c "import os,ara; print(os.path.dirname(ara.__file__))" | ||||
register: ara_location | |||||
register: _ara_location | |||||
changed_when: false | changed_when: false |
@@ -0,0 +1,29 @@ | |||||
--- | |||||
- name: cleanup debian ansible package | |||||
apt: | |||||
pkg: ansible | |||||
state: absent | |||||
- name: cleanup ansible lxc_ssh plugin | |||||
file: | |||||
path: /usr/share/ansible/plugins/connection/lxc_ssh | |||||
state: absent | |||||
- name: cleanup ansible ovh module | |||||
file: | |||||
path: /usr/share/ansible/modules/ovh | |||||
state: absent | |||||
when: not ansible_with_ovh_module | |||||
- name: cleanup ara pip package | |||||
pip: | |||||
name: ara | |||||
state: absent | |||||
when: not ansible_use_ara | |||||
- name: cleanup mitogen pip package | |||||
pip: | |||||
name: mitogen | |||||
state: absent | |||||
when: not ansible_use_mitogen |
@@ -0,0 +1,11 @@ | |||||
--- | |||||
- name: ansible etc directory | |||||
file: | |||||
path: /etc/ansible | |||||
state: directory | |||||
- name: ansible config | |||||
template: | |||||
src: ansible.cfg.j2 | |||||
dest: /etc/ansible/ansible.cfg |
@@ -1,14 +0,0 @@ | |||||
--- | |||||
- name: connection plugin directory | |||||
file: | |||||
path: /usr/share/ansible/plugins/connection | |||||
state: directory | |||||
- name: clone ansible-lxc-ssh | |||||
git: | |||||
#repo: https://github.com/chifflier/ansible-lxc-ssh.git # this wirks for ansible 2.2 with depecration warnings | |||||
#repo: https://github.com/andreasscherbaum/ansible-lxc-ssh.git # this wirks for ansible 2.2 without warnings but not for anisble 2.4 | |||||
repo: https://github.com/lgeorget/ansible-lxc-ssh.git # this works for ansible 2.4 | |||||
dest: /usr/share/ansible/plugins/connection/lxc_ssh | |||||
version: master |
@@ -0,0 +1,18 @@ | |||||
--- | |||||
- include_tasks: setup_Debian.yaml | |||||
- include_tasks: ansible.yaml | |||||
- include_tasks: mitogen.yaml | |||||
when: ansible_use_mitogen | |||||
- include_tasks: ara.yaml | |||||
when: ansible_use_ara | |||||
- include_tasks: ovh_module.yaml | |||||
when: ansible_with_ovh_module | |||||
- import_tasks: config.yaml | |||||
- import_tasks: cleanup.yaml |
@@ -1,23 +0,0 @@ | |||||
--- | |||||
- include_tasks: setup_Debian.yml | |||||
- include_tasks: ansible.yaml | |||||
- include_tasks: connection_plugin_lxc_ssh.yml | |||||
#- include_tasks: ara.yml | |||||
- include_tasks: ovh_module.yml | |||||
- name: ansible etc directory | |||||
file: | |||||
path: /etc/ansible | |||||
state: directory | |||||
- name: ansible config | |||||
template: | |||||
src: ansible.cfg.j2 | |||||
dest: /etc/ansible/ansible.cfg | |||||
- include_tasks: roles.yml |
@@ -0,0 +1,11 @@ | |||||
--- | |||||
- name: mitogen pip package | |||||
pip: | |||||
name: mitogen | |||||
state: latest | |||||
- name: get ansible_mitogen location | |||||
shell: python -c "import os,ansible_mitogen; print(os.path.dirname(ansible_mitogen.__file__))" | |||||
register: _ansible_mitogen_location | |||||
changed_when: false |
@@ -1 +0,0 @@ | |||||
--- |
@@ -20,8 +20,3 @@ | |||||
#- which | #- which | ||||
- python-libcloud | - python-libcloud | ||||
- python-netaddr | - python-netaddr | ||||
- name: uninstall debian ansible module | |||||
apt: | |||||
pkg: ansible | |||||
state: absent |
@@ -4,9 +4,16 @@ stdout_callback = yaml | |||||
library = /usr/share/ansible/modules | library = /usr/share/ansible/modules | ||||
{% if ansible_use_mitogen %} | |||||
strategy_plugins = {{ _ansible_mitogen_location.stdout }}/plugins/strategy | |||||
strategy = mitogen_linear | |||||
{% endif %} | |||||
retry_files_enabled = False | retry_files_enabled = False | ||||
#callback_plugins = {#{{ ara_location.stdout }}#}/plugins/callbacks | |||||
{% if ansible_use_ara %} | |||||
callback_plugins = {{ _ara_location.stdout }}/plugins/callbacks | |||||
{% endif %} | |||||
[ssh_connection] | [ssh_connection] | ||||
ssh_args = -o CheckHostIP=no -o StrictHostKeyChecking=yes | ssh_args = -o CheckHostIP=no -o StrictHostKeyChecking=yes | ||||