| - name: "Install apt dependencies" |
| become: yes |
| apt: |
| name: "{{ item }}" |
| state: present |
| with_items: |
| - python-dev |
| - libffi-dev |
| - python-pip |
| - libssl-dev |
| - sshpass |
| |
| - name: "Install Ansible via pip" |
| pip: name=ansible version=2.2.2.0 |
| become: yes |
| |
| # - name: Ansible Repository |
| # become: yes |
| # apt_repository: |
| # repo: "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}" |
| # register: result |
| # until: result | success |
| # retries: 3 |
| # delay: 10 |
| |
| # - name: Ensure Ansible |
| # become: yes |
| # apt: |
| # name=ansible=2.2.* |
| # state=present |