From 8625cf7d8bb6a6b119183ece1e591abe526a3e95 Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Fri, 19 Jun 2015 10:14:07 -0400 Subject: changed Openshift to OpenShift --- docs/style_guide.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/style_guide.adoc') diff --git a/docs/style_guide.adoc b/docs/style_guide.adoc index 3b888db12..7dc240f2e 100644 --- a/docs/style_guide.adoc +++ b/docs/style_guide.adoc @@ -1,6 +1,6 @@ // vim: ft=asciidoc -= Openshift-Ansible Style Guide += openshift-ansible Style Guide The purpose of this guide is to describe the preferred coding conventions used in this repository (both in ansible and python). -- cgit v1.2.3 From 22d36791e985d0e78f6215bb46c6cd18bd7b719c Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Wed, 24 Jun 2015 10:39:26 -0400 Subject: added .yml extension to style guide. --- docs/style_guide.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs/style_guide.adoc') diff --git a/docs/style_guide.adoc b/docs/style_guide.adoc index 7dc240f2e..2f89a5fae 100644 --- a/docs/style_guide.adoc +++ b/docs/style_guide.adoc @@ -43,6 +43,20 @@ This is a hard limit and is enforced by the build bot. This check MUST NOT be di == Ansible + +=== Ansible Yaml file extension +''' +[cols="2v,v"] +|=== +| **Rule** +| All Ansible Yaml files MUST have a .yml extension (and NOT .YML, .yaml etc). +|=== + +Ansible tooling (like `ansible-galaxy init`) create files with a .yml extension. Also, the Ansible documentation website references files with a .yml extension several times. Because of this, it is normal in the Ansible community to use a .yml extension for all Ansible Yaml files. + +Example: `tasks.yml` + + === Ansible Global Variables Ansible global variables are defined as any variables outside of ansible roles. Examples include playbook variables, variables passed in on the cli, etc. -- cgit v1.2.3 From 0e67b142b4cb069c8986ac025ece78b8acb162ef Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Wed, 8 Jul 2015 09:35:15 -0400 Subject: documented ansible arch team decisions --- docs/style_guide.adoc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'docs/style_guide.adoc') diff --git a/docs/style_guide.adoc b/docs/style_guide.adoc index 2f89a5fae..110e7153f 100644 --- a/docs/style_guide.adoc +++ b/docs/style_guide.adoc @@ -57,18 +57,34 @@ Ansible tooling (like `ansible-galaxy init`) create files with a .yml extension. Example: `tasks.yml` -=== Ansible Global Variables -Ansible global variables are defined as any variables outside of ansible roles. Examples include playbook variables, variables passed in on the cli, etc. +=== Ansible CLI Variables +''' +[cols="2v,v"] +|=== +| **Rule** +| Variables meant to be passed in from the ansible CLI MUST have a prefix of cli_ +|=== + +Ansible allows variables to be passed in on the command line using the `-e` option. These variables MUST have a prefix of cli_ so that it's clear where they came from, and how dangerous they are (can be exploited). + +.Example: +[source] +---- +ansible-playbook -e cli_foo=bar someplays.yml +---- + +=== Ansible Global Variables ''' [cols="2v,v"] |=== | **Rule** | Global variables MUST have a prefix of g_ |=== +Ansible global variables are defined as any variables outside of ansible roles. Examples include playbook variables, variables passed in on the cli, etc. -Example: +.Example: [source] ---- g_environment: someval -- cgit v1.2.3 From 56337d04f3c746b88382d13e13a6b5f52d4a7d24 Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Wed, 22 Jul 2015 10:22:38 -0400 Subject: added decisions made at the last ansible arch meeting. --- docs/style_guide.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/style_guide.adoc') diff --git a/docs/style_guide.adoc b/docs/style_guide.adoc index 110e7153f..09d4839c7 100644 --- a/docs/style_guide.adoc +++ b/docs/style_guide.adoc @@ -65,7 +65,7 @@ Example: `tasks.yml` | Variables meant to be passed in from the ansible CLI MUST have a prefix of cli_ |=== -Ansible allows variables to be passed in on the command line using the `-e` option. These variables MUST have a prefix of cli_ so that it's clear where they came from, and how dangerous they are (can be exploited). +Ansible allows variables to be passed in on the command line using the `-e` option. These variables MUST have a prefix of cli_ so that it's clear where they came from, and that they could be exploited. .Example: -- cgit v1.2.3