install_python.yml #3

  • //
  • guest/
  • robert_cowham/
  • p4benchmark/
  • pb/
  • ansible/
  • install_python.yml
  • View
  • Commits
  • Open Download .zip Download (1 KB)
- name: Transfer and execute a script to install python.
  hosts: replicas
  become: yes
  tasks:

    - name: install packages for development etc
      yum:
        name:
        - yum-utils
        - "@Development tools"
        - zlib-devel 
        - bzip2-devel
        - ncurses-devel
        - sqlite-devel
        - readline-devel
        - tk-devel
        - gdbm-devel 
#        - db4-devel
        - libpcap-devel
        - xz-devel
        - openssl
        - openssl-devel
        state: present

    - name: clean
      command: yum clean -y all

    - name: install repos
      yum:
        name:
        - https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
        - https://centos7.iuscommunity.org/ius-release.rpm

    - name: update
      command: yum update -y

    - name: install python 3.6
      yum:
        name:
        - python36u
        - python36u-pip
        - python36u-devel
        state: present

    - file:
        src: /usr/bin/python3.6
        dest: /usr/bin/python3
        mode: 0755
        state: link

    - file:
        src: /usr/bin/pip3.6
        dest: /usr/bin/pip3
        mode: 0755
        state: link

    - name: Pip install packages
      command: pip3.6 install p4python==2017.2.1615960 pyaml numpy pyzmq locustio

# Change User Description Committed
#6 25520 Robert Cowham Tidied up.
Created 2 client workspaces
#5 25350 Robert Cowham Remove unnecessary dev tools if we don't have to compile packages such as p4python
#4 25349 Robert Cowham Fix python package and bench clients
#3 25348 Robert Cowham Got p4python installed and pip links
#2 25347 Robert Cowham Proper ansible yum install
#1 25346 Robert Cowham Populate //stream/pure.