--- - name: install required packages package: name: "{{ item }}" state: present with_items: "{{ base_packages }}" tags: - install - name: install python packages package: name: "{{ item }}" state: present with_items: "{{ python_packages }}" tags: - install - name: create required directories file: state: directory path: "{{ item }}" with_items: - "{{ vulnwhisperer.prefix }}" - "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.location }}" tags: - install - name: deploy application git: accept_hostkey: yes clone: yes dest: "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.location }}" force: yes repo: "{{ vulnwhisperer.repository }}" register: repository tags: - install - update - name: create virtualenv pip: virtualenv: "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.venv_location }}" requirements: "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.location }}/requirements.txt" virtualenv_python: /usr/bin/python2.7 tags: - install - update - name: install vulnwhisperer in virtualenv command: "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.venv_location }}/bin/python setup.py install" args: chdir: "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.location }}" tags: - install - update - name: load configuration file from provided path set_fact: configuration_file_contents: "{{lookup('file', configuration_file )}}" - name: install vulnwhisperer configuration file copy: dest: "{{ vulnwhisperer.prefix }}/{{ vulnwhisperer.location }}/configs/{{ vulnwhisperer.configuration_file_name }}" content: "{{ configuration_file_contents }}" tags: - install - update