.. Document meta
:orphan:
.. |antsibull-internal-nbsp| unicode:: 0xA0
:trim:
.. meta::
:antsibull-docs: 2.24.0
.. Anchors
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role:
.. Title
deploy_user
===========
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__entrypoint-main:
.. version_added
.. Deprecated
Synopsis
--------
.. Description
- Provisions a dedicated system user for automated deployments, ensures matching UID/GID for cross\-node consistency, generates and installs SSH keys, hardens :literal:`sshd\_config` to allow only the deploy user, and drops a :literal:`.profile` that activates the app's Python virtualenv on interactive login.
- The role depends on the :literal:`build\_dependencies` role (see :literal:`meta/main.yml`\ ). Setup tasks are tagged :ansval:`setup,never` and are skipped unless the playbook is invoked with :literal:`\-\-tags=all,setup`.
.. Requirements
.. Options
Parameters
----------
.. tabularcolumns:: \X{1}{3}\X{2}{3}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Parameter
- Comments
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__app_name:
.. rst-class:: ansible-option-title
**app_name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Application identifier used as a comment in the generated :literal:`.profile` header. Purely cosmetic; safe to omit.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__current_deploy:
.. rst-class:: ansible-option-title
**current_deploy**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Path to the currently\-active deploy directory. Referenced by the :literal:`activate` alias in the deploy user's :literal:`.profile`. Set by the :literal:`deploy` role.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__deploy_env_vars:
.. rst-class:: ansible-option-title
**deploy_env_vars**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
Optional mapping of extra environment variables to export from the deploy user's :literal:`.profile`. Each key becomes an :literal:`export` line.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__deploy_user:
.. rst-class:: ansible-option-title
**deploy_user**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Name of the deployment user and its primary group.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"conan"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__deploy_user_shell:
.. rst-class:: ansible-option-title
**deploy_user_shell**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Login shell for the deployment user.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"/bin/bash"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__deploy_user_uid:
.. rst-class:: ansible-option-title
**deploy_user_uid**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`integer` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
Numeric UID for the deployment user; also used as the GID for the matching primary group so file ownership is consistent across nodes (important for :literal:`rsync` between application and Solr servers). Must be set per host; no default is provided.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__install_root:
.. rst-class:: ansible-option-title
**install_root**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Filesystem root under which the app is installed. When defined, the generated :literal:`activate` alias uses it to locate the current deploy. Normally set by the :literal:`deploy` / :literal:`configure` roles.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__python_venv_path_prefix:
.. rst-class:: ansible-option-title
**python_venv_path_prefix**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Optional path fragment prepended to :literal:`env/bin/activate` when building shell aliases. Use when the virtualenv is not a direct sibling of the current deploy directory.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`""`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__runtime_env:
.. rst-class:: ansible-option-title
**runtime_env**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Deployment environment name (e.g. :ansval:`staging`\ , :ansval:`production`\ ). Exported as :ansenvvar:`DJANGO\_ENV` in the deploy user's :literal:`.profile` for django\-split\-settings\-based apps. Typically set via :literal:`\-e runtime\_env=\` on the playbook command line; see :literal:`README.md` for defaults per environment.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.princeton_cdh.cdh.deploy_user_role__parameter-main__webapp_group:
.. rst-class:: ansible-option-title
**webapp_group**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Existing webserver group on the target system. The deployment user is added as a supplementary member so it can write to shared web\-server\-owned files (logs, media, etc.).
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`"www\-data"`
.. raw:: html
.. Attributes
.. Notes
.. Seealso
Authors
-------
- Center for Digital Humanities @ Princeton
.. Extra links
Collection links
----------------
.. ansible-links::
- title: "Repository (Sources)"
url: "https://github.com/Princeton-CDH/cdh-ansible"
external: true
.. Parsing errors