Open seallard opened 6 months ago
Done!
Done!
Playbook to install Apache
---
- name: Install and start Apache HTTP server
hosts: localhost
become: yes
tasks:
- name: Ensure Apache is installed
ansible.builtin.apt:
name: apache2
state: present
update_cache: yes
- name: Ensure Apache is running and enabled
ansible.builtin.service:
name: "{{ 'apache2' }}"
state: started
enabled: yes
Playbook to restart Apache and reinstall if restart fails
---
- name: Install and start Apache HTTP server
hosts: localhost
become: yes
tasks:
- name: Ensure Apache is installed
ansible.builtin.apt:
name: apache2
state: present
update_cache: yes
- name: Ensure Apache is running and enabled
ansible.builtin.service:
name: "{{ 'apache2' }}"
state: started
enabled: yes
Go ahead and write some other playbooks and use it to configure the container.
If you find an interesting Ansible feature, share it with the rest of the team.
We can showcase any interesting stuff during the retro.