diff --git a/doc/source/roles.rst b/doc/source/roles.rst index d7e0d4ee37..a01501172c 100644 --- a/doc/source/roles.rst +++ b/doc/source/roles.rst @@ -5,4 +5,24 @@ Ansible Roles Documentation for roles included in `system-config` +There are two types of roles. Top-level roles, kept in the ``roles/`` +directory, are available to be used as roles in Zuul jobs. This +places some constraints on the roles, such as not being able to use +plugins. Add + +.. code-block:: yaml + + roles: + - zuul: openstack-infra/system-config + +to your job definition to source these roles. + +Roles in ``playbooks/roles`` are designed to be run on the +Infrastructure control-plane (i.e. from ``bridge.openstack.org``). +These roles are not available to be shared with Zuul jobs. + +Role documentation +------------------ + + .. zuul:autoroles:: diff --git a/playbooks/roles/exim/README.rst b/roles/exim/README.rst similarity index 100% rename from playbooks/roles/exim/README.rst rename to roles/exim/README.rst diff --git a/playbooks/roles/exim/defaults/main.yaml b/roles/exim/defaults/main.yaml similarity index 100% rename from playbooks/roles/exim/defaults/main.yaml rename to roles/exim/defaults/main.yaml diff --git a/playbooks/roles/exim/handlers/main.yaml b/roles/exim/handlers/main.yaml similarity index 100% rename from playbooks/roles/exim/handlers/main.yaml rename to roles/exim/handlers/main.yaml diff --git a/playbooks/roles/exim/tasks/RedHat.yaml b/roles/exim/tasks/RedHat.yaml similarity index 100% rename from playbooks/roles/exim/tasks/RedHat.yaml rename to roles/exim/tasks/RedHat.yaml diff --git a/playbooks/roles/exim/tasks/default.yaml b/roles/exim/tasks/default.yaml similarity index 100% rename from playbooks/roles/exim/tasks/default.yaml rename to roles/exim/tasks/default.yaml diff --git a/playbooks/roles/exim/tasks/main.yaml b/roles/exim/tasks/main.yaml similarity index 100% rename from playbooks/roles/exim/tasks/main.yaml rename to roles/exim/tasks/main.yaml diff --git a/playbooks/roles/exim/templates/aliases.j2 b/roles/exim/templates/aliases.j2 similarity index 100% rename from playbooks/roles/exim/templates/aliases.j2 rename to roles/exim/templates/aliases.j2 diff --git a/playbooks/roles/exim/templates/exim.sysconfig.j2 b/roles/exim/templates/exim.sysconfig.j2 similarity index 100% rename from playbooks/roles/exim/templates/exim.sysconfig.j2 rename to roles/exim/templates/exim.sysconfig.j2 diff --git a/playbooks/roles/exim/templates/exim4.conf.j2 b/roles/exim/templates/exim4.conf.j2 similarity index 100% rename from playbooks/roles/exim/templates/exim4.conf.j2 rename to roles/exim/templates/exim4.conf.j2 diff --git a/playbooks/roles/exim/templates/exim4.default.j2 b/roles/exim/templates/exim4.default.j2 similarity index 100% rename from playbooks/roles/exim/templates/exim4.default.j2 rename to roles/exim/templates/exim4.default.j2 diff --git a/playbooks/roles/exim/vars/Debian.yaml b/roles/exim/vars/Debian.yaml similarity index 100% rename from playbooks/roles/exim/vars/Debian.yaml rename to roles/exim/vars/Debian.yaml diff --git a/playbooks/roles/exim/vars/RedHat.yaml b/roles/exim/vars/RedHat.yaml similarity index 100% rename from playbooks/roles/exim/vars/RedHat.yaml rename to roles/exim/vars/RedHat.yaml diff --git a/tox.ini b/tox.ini index d3511bc5df..b46044e620 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps = -r{toxinidir}/test-requirements.txt [testenv:linters] whitelist_externals = bash commands = - bash -c "find playbooks/roles -maxdepth 1 -mindepth 1 -type d -print0 | \ + bash -c "find roles/ playbooks/roles -maxdepth 1 -mindepth 1 -type d -print0 | \ xargs -t -n1 -0 {toxinidir}/tools/check_readme.sh" flake8 {toxinidir}/tools/run-bashate.sh @@ -20,7 +20,7 @@ commands = python3 {toxinidir}/tools/irc_checks.py python3 {toxinidir}/tools/check_clouds_yaml.py # Ansible Lint Check - bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ + bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ ansible-lint -x ANSIBLE0004 -x ANSIBLE0006 -x ANSIBLE0007 -x ANSIBLE0011 \ -x ANSIBLE0012 -x ANSIBLE0013 -x ANSIBLE0015"