--- - name: Container Setup vars: lxc_base: ansible-alpine3.11 lxc_name: isso import_playbook: ../common/tasks/lxc.yml - name: Install Isso Commenting Server hosts: isso vars_files: - ../variables.yml tasks: - name: Ensuring group exists group: name: "{{ isso_user }}" state: present - name: Creating user and making home directory user: system: yes state: present name: "{{ isso_user }}" groups: "{{ isso_user }}" home: "{{ isso_home }}" - name: Installing the required dependencies apk: state: present update_cache: yes name: - sudo - git - gcc - python3-dev - musl-dev - libffi-dev - npm - make - supervisor - block: - name: Cloning repository git: repo: https://github.com/posativ/isso dest: "{{ isso_home }}" version: "{{ isso_version }}" - name: Setting up python virtual environment shell: python3 -m venv . args: chdir: "{{ isso_home }}" creates: bin/activate - name: Setting up build environment shell: | . bin/activate python setup.py develop args: chdir: "{{ isso_home }}" creates: isso.egg-info - name: Installing JavaScript dependencies shell: npm install bower requirejs jade args: chdir: "{{ isso_home }}" creates: node_modules/.bin - name: Building JavaScript assets shell: | PATH=$PATH:"{{ isso_home }}"/node_modules/.bin make init make js args: chdir: "{{ isso_home }}" creates: isso/js/embed.min.js - name: Copying config file copy: src: isso.conf dest: "{{ isso_home }}/isso.conf" mode: '0644' become: true become_user: "{{ isso_user }}" - name: Copying supervisord config file copy: src: supervisord.conf dest: /etc/supervisord.conf mode: '0644' - name: Ensuring supervisord has been started and enabled service: name: supervisord state: restarted enabled: yes changed_when: false - name: Waiting for supervisor to become active wait_for: port: 9100 - name: Ensuring isso has been started supervisorctl: name: isso state: restarted changed_when: false - name: Waiting for application to become active wait_for: port: 8100 - name: Testing if isso admin page exists uri: url: http://0.0.0.0:8100/admin return_content: yes - name: Testing if isso JavaScript exists uri: url: http://0.0.0.0:8100/js/embed.min.js return_content: yes