Verify if pip things work

Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
This commit is contained in:
Taseer Ahmed 2017-09-26 20:06:49 +05:00
parent e9f69f0310
commit 12c37c07da
3 changed files with 73 additions and 73 deletions

View File

@ -23,10 +23,10 @@ congress_requirements_git_repo: https://git.openstack.org/openstack/requirements
congress_requirements_git_install_branch: master congress_requirements_git_install_branch: master
congress_developer_mode: false congress_developer_mode: false
congress_venv_tag: untagged congress_venv_tag: master
congress_bin: "/openstack/venvs/congress-{{ congress_venv_tag }}/bin" congress_bin: "/openstack/venvs/congress-{{ congress_venv_tag }}/bin"
congress_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/congress.tgz congress_venv_download_url: http://127.0.0.1/venvs/{{ congress_venv_tag }}/ubuntu-16.04-x86_64/congress-{{ congress_venv_tag }}.tgz
congress_requires_pip_packages: congress_requires_pip_packages:
- virtualenv - virtualenv

View File

@ -14,79 +14,79 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: install congress #- name: install congress
shell: python setup.py install # shell: python setup.py install
args: # args:
chdir: /opt/congress # chdir: /opt/congress
#- name: Install required pip packages - name: Install required pip packages
# pip: pip:
# name: "{{ congress_requires_pip_packages | join(' ') }}" name: "{{ congress_requires_pip_packages | join(' ') }}"
# state: "{{ congress_package_state }}" state: "{{ congress_package_state }}"
# register: install_packages register: install_packages
# until: install_packages|success until: install_packages|success
# retries: 5 retries: 5
# delay: 2 delay: 2
#- name: Retrieve checksum for venv download - name: Retrieve checksum for venv download
# uri: uri:
# url: "{{ congress_venv_download_url | replace('tgz', 'checksum') }}" url: "{{ congress_venv_download_url | replace('tgz', 'checksum') }}"
# return_content: yes return_content: yes
# register: congress_venv_checksum register: congress_venv_checksum
# when: not congress_developer_mode | bool when: not congress_developer_mode | bool
#- name: Attempt venv download - name: Attempt venv download
# get_url: get_url:
# url: "{{ congress_venv_download_url }}" url: "{{ congress_venv_download_url }}"
# dest: "/var/cache/{{ congress_venv_download_url | basename }}" dest: "/var/cache/{{ congress_venv_download_url | basename }}"
# checksum: "sha1:{{ congress_venv_checksum.content | trim }}" checksum: "sha1:{{ congress_venv_checksum.content | trim }}"
# register: congress_get_venv register: congress_get_venv
# when: not congress_developer_mode | bool when: not congress_developer_mode | bool
#- name: Remove existing venv - name: Remove existing venv
# file: file:
# path: "{{ congress_bin | dirname }}" path: "{{ congress_bin | dirname }}"
# state: absent state: absent
# when: congress_get_venv | changed when: congress_get_venv | changed
#- name: Create congress venv dir - name: Create congress venv dir
# file: file:
# path: "{{ congress_bin | dirname }}" path: "{{ congress_bin | dirname }}"
# state: directory state: directory
# register: congress_venv_dir register: congress_venv_dir
# when: not congress_developer_mode | bool when: not congress_developer_mode | bool
#- name: Unarchive pre-built venv - name: Unarchive pre-built venv
# unarchive: unarchive:
# src: "/var/cache/{{ congress_venv_download_url | basename }}" src: "/var/cache/{{ congress_venv_download_url | basename }}"
# dest: "{{ congress_bin | dirname }}" dest: "{{ congress_bin | dirname }}"
# copy: "no" copy: "no"
# when: when:
# - not congress_developer_mode | bool - not congress_developer_mode | bool
# - congress_get_venv | changed or congress_venv_dir | changed - congress_get_venv | changed or congress_venv_dir | changed
#- name: Install pip packages - name: Install pip packages
# pip: pip:
# name: "{{ congress_pip_packages | join(' ') }}" name: "{{ congress_pip_packages | join(' ') }}"
# state: "{{ congress_package_state }}" state: "{{ congress_package_state }}"
# virtualenv: "{{ congress_bin | dirname }}" virtualenv: "{{ congress_bin | dirname }}"
# virtualenv_site_packages: "no" virtualenv_site_packages: "no"
# register: install_packages register: install_packages
# until: install_packages|success until: install_packages|success
# retries: 5 retries: 5
# delay: 2 delay: 2
# when: congress_developer_mode | bool when: congress_developer_mode | bool
#- name: Update virtualenv path - name: Update virtualenv path
# command: > command: >
# virtualenv-tools --update-path=auto --reinitialize {{ congress_bin | dirname }} virtualenv-tools --update-path=auto --reinitialize {{ congress_bin | dirname }}
# when: when:
# - not congress_developer_mode | bool - not congress_developer_mode | bool
# - congress_get_venv | changed or congress_venv_dir | changed - congress_get_venv | changed or congress_venv_dir | changed
#- name: Record the venv tag deployed - name: Record the venv tag deployed
# ini_file: ini_file:
# dest: "/etc/ansible/facts.d/openstack_ansible.fact" dest: "/etc/ansible/facts.d/openstack_ansible.fact"
# section: congress section: congress
# option: venv_tag option: venv_tag
# value: "{{ congress_venv_tag }}" value: "{{ congress_venv_tag }}"

View File

@ -47,10 +47,10 @@
- /etc/congress - /etc/congress
- /etc/congress/snapshot - /etc/congress/snapshot
- name: generate configuration file #- name: generate configuration file
shell: tox -egenconfig # shell: tox -egenconfig
args: # args:
chdir: /opt/congress # chdir: /opt/congress
#- name: copy files #- name: copy files
# copy: # copy: