No description
Find a file
2025-10-09 16:10:49 +02:00
defaults feat: first version of role 2025-10-09 16:10:49 +02:00
files feat: first version of role 2025-10-09 16:10:49 +02:00
handlers feat: first version of role 2025-10-09 16:10:49 +02:00
meta feat: first version of role 2025-10-09 16:10:49 +02:00
tasks feat: first version of role 2025-10-09 16:10:49 +02:00
tests feat: first version of role 2025-10-09 16:10:49 +02:00
vars feat: first version of role 2025-10-09 16:10:49 +02:00
README.md feat: first version of role 2025-10-09 16:10:49 +02:00

Demo FastAPI

This role deploys a FastAPI demo container.

Requirements

The Docker image demofastapi:simple must be present on the machine.

Role Variables

Variable name Required Default value (if any) Description
state Set to present or absent depending on the desired state of the application

Example Playbook

Here is a playbook to deploy this role locally

---
  # Name of the playbook
- name: Start demo app
  # List of machines on which the playbook wil run
  hosts: localhost
  # List of tasks the playbook will run
  tasks:
    # Instead of listing tasks, we call a role
    - name: Call to role
      ansible.builtin.include_role:
        # By default, ansible will look for the role in a directory named roles
        name: demofastapi
      # We specify the input variables expected by the role
      vars:
        state: present

License

WTFPL

Author Information

Role written by Charly Collin as an example for a class at Rennes's Cyberschool.