diff --git a/tasks/ansible.yaml b/tasks/ansible.yaml index 87c4ac4..7c0f8be 100644 --- a/tasks/ansible.yaml +++ b/tasks/ansible.yaml @@ -4,3 +4,4 @@ pip: name: ansible state: latest + executable: pip3 diff --git a/tasks/ara.yaml b/tasks/ara.yaml index ca7ce76..e6179d0 100644 --- a/tasks/ara.yaml +++ b/tasks/ara.yaml @@ -4,8 +4,9 @@ pip: name: ara state: present + executable: pip3 - name: get ara location - shell: python -c "import os,ara; print(os.path.dirname(ara.__file__))" + shell: python3 -c "import os,ara; print(os.path.dirname(ara.__file__))" register: _ara_location changed_when: false diff --git a/tasks/cleanup.yaml b/tasks/cleanup.yaml index 0223fb4..5311fbf 100644 --- a/tasks/cleanup.yaml +++ b/tasks/cleanup.yaml @@ -1,6 +1,6 @@ --- -- name: cleanup debian ansible package +- name: make sure debian ansible package is absent apt: pkg: ansible state: absent @@ -20,15 +20,41 @@ pip: name: ara state: absent + executable: pip3 when: not ansible_use_ara - name: cleanup mitogen pip package pip: name: mitogen state: absent + executable: pip3 when: not ansible_use_mitogen - name: cleanup ansible ovh module file: path: /usr/share/ansible/modules/ovh/ state: absent + +- name: make sure old python2 ansible pip package is absent + pip: + name: ansible + state: absent + executable: pip2 + +- name: make sure old python2 ara pip package is absent + pip: + name: ara + state: absent + executable: pip2 + +- name: make sure old python2 ovh client package is absent + pip: + name: ovh + executable: pip2 + state: absent + +- name: make sure old python2 mitogen pip package is absent + pip: + name: mitogen + state: absent + executable: pip2 diff --git a/tasks/mitogen.yaml b/tasks/mitogen.yaml index 1251362..b6d3657 100644 --- a/tasks/mitogen.yaml +++ b/tasks/mitogen.yaml @@ -4,8 +4,9 @@ pip: name: mitogen state: latest + executable: pip3 - name: get ansible_mitogen location - shell: python -c "import os,ansible_mitogen; print(os.path.dirname(ansible_mitogen.__file__))" + shell: python3 -c "import os,ansible_mitogen; print(os.path.dirname(ansible_mitogen.__file__))" register: _ansible_mitogen_location changed_when: false diff --git a/tasks/ovh_module.yaml b/tasks/ovh_module.yaml index f79485a..3b8b976 100644 --- a/tasks/ovh_module.yaml +++ b/tasks/ovh_module.yaml @@ -3,6 +3,7 @@ - name: python ovh client pip: name: ovh + executable: pip3 - name: ansible ovh module git: diff --git a/tasks/setup_Debian.yaml b/tasks/setup_Debian.yaml index 2446a6b..86a5d25 100644 --- a/tasks/setup_Debian.yaml +++ b/tasks/setup_Debian.yaml @@ -7,16 +7,16 @@ - ipv6calc - uuid - git - - python-jmespath + - python3-jmespath # ara required_packages: - gcc - libffi-dev - libssl-dev - libxml2-dev - libxslt-dev - - python-dev - - python-setuptools - - python-pymysql + - python3-dev + - python3-setuptools + - python3-pymysql #- which - - python-libcloud - - python-netaddr + - python3-libcloud + - python3-netaddr