--- - block: - name: Create the parse user user: name={{ parse_server_user }} home={{ parse_server_user_home }} createhome=no system=yes shell=/bin/bash - name: Create the parse home directory file: dest={{ parse_server_user_home }} owner={{ parse_server_user }} group={{ parse_server_user }} mode=0755 state=directory - name: Create the parse config directory file: dest={{ parse_server_config_dir }} owner={{ parse_server_user }} group={{ parse_server_user }} mode=0750 state=directory - name: Install the parse server npm: name={{ item }} global=yes state=present production=true with_items: '{{ parse_server_npm_modules }}' - name: Install the parse server environment file template: src=parse-server.env dest={{ parse_server_config_dir }}/parse-server.env owner={{ parse_server_user }} group={{ parse_server_user }} mode=0640 - name: Install the parse server startup script template: src=parse_server.upstart.j2 dest=/etc/init/parse_server.conf mode=0644 - name: Ensure that the parse service is started and enabled service: name=parse_server state=started enabled=yes tags: [ 'parse', 'parse_server' ] - block: - name: Install the parse server dashboard npm: name={{ item }} global=yes state=present production=true with_items: '{{ parse_server_dashboard_npm_modules }}' - name: Install the parse dashboard environment variables file template: src=parse-server-dashboard.env dest={{ parse_server_config_dir }}/parse-server-dashboard.env owner={{ parse_server_user }} group={{ parse_server_user }} mode=0640 - name: Install the parse dashboard configuration file template: src=parse-dashboard-config.json dest={{ parse_server_config_dir }}/parse-dashboard-config.json owner={{ parse_server_user }} group={{ parse_server_user }} mode=0640 - name: Install the parse dashboard startup script template: src=parse_server_dashboard.upstart.j2 dest=/etc/init/parse_server_dashboard.conf mode=0644 - name: Ensure that the parse dashboard service is started and enabled service: name=parse_server_dashboard state=started enabled=yes when: parse_server_dashboard_install tags: [ 'parse', 'parse_server', 'parse_server_dashboard' ]