Skip to content

redhat-gpte-devopsautomation/zt-advanced-ansible-network-automation

Repository files navigation

zt-writing-your-first-playbook

Understanding Directory Structure

  1. Content Directory

    tree output
    .
    ├── README.adoc                 # Readme file
    ├── content                     # Content directory
    ├── runtime-automation          # Playbook directory
    ├── zero-touch-config.yml       # Configuration file
    └── zero-touch-site.yml
  2. Example: Module Playbook Directory Structure

    tree output
    runtime-automation/
    ├── 01-playbook-inventory               # The directory name should be the same as# the module content page name
    │   ├── setup.yml                       # Setup playbook which run at start of module# and when clicked on next button
    │   ├── solve.yml                       # Solve playbook, run when clicked on solve button
    │   └── validation.yml                  # Validation playbook, run when click on next button
    ├── 02-playbook-directory-structure
    │   ├── setup.yml
    │   ├── solve.yml
    │   └── validation.yml
    │
    ├── # --- output Omitted ---
    │
    ├── 10-roles
    │   ├── setup.yml
    │   ├── solve.yml
    │   └── validation.yml
    ├── ansible.cfg                         # Ansible configuration used with module playbooks
    └── inventory                           # Inventory for the playbook

Understanding Zero Touch Configration file

  1. Example: The zero-touch-config.yml configuration file

    tree output
    ---
    antora:
      name: modules
      dir: www
      modules:
        - name: 01-playbook-inventory               # Module Name
          label: Playbook Inventory                 # Module Label
          solveButton: true                         # Enable Solve button
        - name: 02-playbook-directory-structure
          label: Playbook Directory Structure
          solveButton: true
    
        # --- output Omitted ---
    
        - name: 10-roles
          label: Roles
          solveButton: true
    
    tabs:
      - name: VSCode Editor                         # Tab name
        port: 8443                                  # Port no of the service
        path: /?folder=/home/rhel/ansible-files/    # Path suffix
      - name: ">_control"
        port: 443
        path: /tty1
Note
Keep the rest of directories and files as default.
Important
This stucture works well with agnosticd role showroom .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published