summaryrefslogtreecommitdiffstats
path: root/examples/inventory
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
commit2fe34b6444502079dc0b84365ce82dbc92de308e (patch)
tree8fedcab52bbbc3db6c5aa909a88a7a7b81685018 /examples/inventory
parentInitial commit. (diff)
downloadansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.tar.xz
ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.zip
Adding upstream version 6.17.2.upstream/6.17.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/inventory')
-rw-r--r--examples/inventory/broken_dev_inventory.yml3
-rw-r--r--examples/inventory/inventory.yml31
-rw-r--r--examples/inventory/production.yml38
3 files changed, 72 insertions, 0 deletions
diff --git a/examples/inventory/broken_dev_inventory.yml b/examples/inventory/broken_dev_inventory.yml
new file mode 100644
index 0000000..0d7a793
--- /dev/null
+++ b/examples/inventory/broken_dev_inventory.yml
@@ -0,0 +1,3 @@
+---
+all:
+ foo: {} # invalid based on inventory json schema
diff --git a/examples/inventory/inventory.yml b/examples/inventory/inventory.yml
new file mode 100644
index 0000000..8752d9b
--- /dev/null
+++ b/examples/inventory/inventory.yml
@@ -0,0 +1,31 @@
+---
+# https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html
+ungrouped: {}
+all:
+ hosts:
+ mail.example.com:
+ children:
+ webservers:
+ hosts:
+ foo.example.com:
+ bar.example.com:
+ dbservers:
+ hosts:
+ one.example.com:
+ two.example.com:
+ three.example.com:
+ east:
+ hosts:
+ foo.example.com:
+ one.example.com:
+ two.example.com:
+ west:
+ hosts:
+ bar.example.com:
+ three.example.com:
+ prod:
+ children:
+ east: {}
+ test:
+ children:
+ west: {}
diff --git a/examples/inventory/production.yml b/examples/inventory/production.yml
new file mode 100644
index 0000000..a8a7deb
--- /dev/null
+++ b/examples/inventory/production.yml
@@ -0,0 +1,38 @@
+---
+all:
+ hosts:
+ mail.example.com:
+ children:
+ webservers:
+ hosts:
+ foo.example.com:
+ bar.example.com:
+ # ranges are supported:
+ www[01:50].example.com:
+ www[01:50:2].example.com:
+ # these are variables:
+ var_1: value_1
+ another_var: 200
+ dbservers:
+ hosts:
+ one.example.com:
+ two.example.com:
+ three.example.com:
+ east:
+ hosts:
+ foo.example.com:
+ one.example.com:
+ two.example.com:
+ west:
+ hosts:
+ bar.example.com:
+ three.example.com:
+ prod:
+ children:
+ east:
+ test:
+ children:
+ west:
+ # add variables for all hosts
+ vars:
+ my_var: 123