A collection of simple Ansible playbooks designed for Ansible Automation Platform (AAP).
This repository contains multiple playbooks that demonstrate basic Ansible functionality. Each playbook can be configured as a separate Job Template in AAP.
- Ansible 2.9 or higher
- Ansible Automation Platform (AAP) 2.x or higher (for AAP usage)
hello-world.yml- Simple greeting playbookgoodbye-world.yml- Farewell message playbookdatetime.yml- Displays current date/time informationinventory.yml- Sample inventory file (localhost)
Displays greeting messages and welcomes users.
Usage:
ansible-playbook -i inventory.yml hello-world.ymlDisplays farewell messages.
Usage:
ansible-playbook -i inventory.yml goodbye-world.ymlGathers and displays comprehensive date/time information including ISO format, timezone, epoch time, and day of week.
Usage:
ansible-playbook -i inventory.yml datetime.yml- Navigate to Resources → Projects
- Click "Add"
- Configure:
- Name: "Demo Playbooks"
- Source Control Type: Git
- Source Control URL: [Your repository URL]
- Source Control Branch/Tag/Commit: main (or your branch)
- Click "Save"
- Navigate to Resources → Inventories
- Either use an existing inventory or create a new one
- Add hosts as needed (or import the included
inventory.yml)
Create a separate Job Template for each playbook:
- Navigate to Resources → Templates → Add → Job Template
- Name: "Hello World"
- Job Type: Run
- Inventory: [Select your inventory]
- Project: "Demo Playbooks"
- Playbook:
hello-world.yml - Credentials: [Add if needed]
- Click "Save"
- Name: "Goodbye World"
- Playbook:
goodbye-world.yml - (Other settings same as above)
- Name: "DateTime Info"
- Playbook:
datetime.yml - (Other settings same as above)
- Navigate to the Job Template you want to run
- Click the rocket icon 🚀 to launch
- View the output in the job details page
- Greeting messages
- Welcome message
- Success confirmation
- Farewell messages
- See you later message
- Success confirmation
- ISO 8601 timestamp
- Human-readable date and time
- Timezone information
- Unix epoch time
- Day of week (number and name)
You can modify any playbook to:
- Target different hosts by changing the
hostsparameter - Enable/disable fact gathering with
gather_facts - Add additional tasks as needed
- Change messages to suit your needs
MIT
Generated for AAP Hello World demonstration