first playbooks
This commit is contained in:
parent
47073d438e
commit
4d8f26f1a9
5
first-playbook/ansible.cfg
Normal file
5
first-playbook/ansible.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
[defaults]
|
||||
inventory = inventory
|
||||
private_key_file = ~/.ssh/hetzner
|
||||
|
||||
|
18
first-playbook/install_apache.yml
Normal file
18
first-playbook/install_apache.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
|
||||
- name: Update repository index
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install apache2 package
|
||||
ansible.builtin.apt:
|
||||
name: apache2
|
||||
state: latest
|
||||
|
||||
- name: Install support for php
|
||||
ansible.builtin.apt:
|
||||
name: libapache2-mod-php
|
||||
state: latest
|
2
first-playbook/inventory
Normal file
2
first-playbook/inventory
Normal file
@ -0,0 +1,2 @@
|
||||
10.0.0.7
|
||||
10.0.0.8
|
18
first-playbook/remove_apache.yml
Normal file
18
first-playbook/remove_apache.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
|
||||
- name: Update repository index
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install apache2 package
|
||||
ansible.builtin.apt:
|
||||
name: apache2
|
||||
state: absent
|
||||
|
||||
- name: Install support for php
|
||||
ansible.builtin.apt:
|
||||
name: libapache2-mod-php
|
||||
state: absent
|
Loading…
Reference in New Issue
Block a user