diff options
Diffstat (limited to 'docs/docsite/rst/getting_started/yaml')
5 files changed, 64 insertions, 0 deletions
diff --git a/docs/docsite/rst/getting_started/yaml/first_playbook.yaml b/docs/docsite/rst/getting_started/yaml/first_playbook.yaml new file mode 100644 index 0000000..dd0ef63 --- /dev/null +++ b/docs/docsite/rst/getting_started/yaml/first_playbook.yaml @@ -0,0 +1,8 @@ +- name: My first play + hosts: virtualmachines + tasks: + - name: Ping my hosts + ansible.builtin.ping: + - name: Print message + ansible.builtin.debug: + msg: Hello world diff --git a/docs/docsite/rst/getting_started/yaml/inventory_example_vms.yaml b/docs/docsite/rst/getting_started/yaml/inventory_example_vms.yaml new file mode 100644 index 0000000..d5edbca --- /dev/null +++ b/docs/docsite/rst/getting_started/yaml/inventory_example_vms.yaml @@ -0,0 +1,8 @@ +virtualmachines: + hosts: + vm01: + ansible_host: 192.0.2.50 + vm02: + ansible_host: 192.0.2.51 + vm03: + ansible_host: 192.0.2.52
\ No newline at end of file diff --git a/docs/docsite/rst/getting_started/yaml/inventory_group_structure.yaml b/docs/docsite/rst/getting_started/yaml/inventory_group_structure.yaml new file mode 100644 index 0000000..93dd6a9 --- /dev/null +++ b/docs/docsite/rst/getting_started/yaml/inventory_group_structure.yaml @@ -0,0 +1,30 @@ +leafs: + hosts: + leaf01: + ansible_host: 192.0.2.100 + leaf02: + ansible_host: 192.0.2.110 + +spines: + hosts: + spine01: + ansible_host: 192.0.2.120 + spine02: + ansible_host: 192.0.2.130 + +network: + children: + leafs: + spines: + +webservers: + hosts: + webserver01: + ansible_host: 192.0.2.140 + webserver02: + ansible_host: 192.0.2.150 + +datacenter: + children: + network: + webservers:
\ No newline at end of file diff --git a/docs/docsite/rst/getting_started/yaml/inventory_variables_group.yaml b/docs/docsite/rst/getting_started/yaml/inventory_variables_group.yaml new file mode 100644 index 0000000..6f934aa --- /dev/null +++ b/docs/docsite/rst/getting_started/yaml/inventory_variables_group.yaml @@ -0,0 +1,10 @@ +webservers: + hosts: + webserver01: + ansible_host: 192.0.2.140 + http_port: 80 + webserver02: + ansible_host: 192.0.2.150 + http_port: 443 + vars: + ansible_user: my_server_user
\ No newline at end of file diff --git a/docs/docsite/rst/getting_started/yaml/inventory_variables_host.yaml b/docs/docsite/rst/getting_started/yaml/inventory_variables_host.yaml new file mode 100644 index 0000000..98ab165 --- /dev/null +++ b/docs/docsite/rst/getting_started/yaml/inventory_variables_host.yaml @@ -0,0 +1,8 @@ +webservers: + hosts: + webserver01: + ansible_host: 192.0.2.140 + http_port: 80 + webserver02: + ansible_host: 192.0.2.150 + http_port: 443
\ No newline at end of file |