From 1450cd913ad5d08d56f9e5e21e824f597f801862 Mon Sep 17 00:00:00 2001 From: Caleb Fultz Date: Fri, 12 Jul 2024 16:12:59 -0400 Subject: [PATCH] refactoring playbook --- refactoring/ansible.cfg | 5 +++++ refactoring/install_apache.yml | 15 +++++++++++++++ refactoring/inventory | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 refactoring/ansible.cfg create mode 100644 refactoring/install_apache.yml create mode 100644 refactoring/inventory diff --git a/refactoring/ansible.cfg b/refactoring/ansible.cfg new file mode 100644 index 0000000..0056832 --- /dev/null +++ b/refactoring/ansible.cfg @@ -0,0 +1,5 @@ +[defaults] +inventory = inventory +private_key_file = ~/.ssh/hetzner + + diff --git a/refactoring/install_apache.yml b/refactoring/install_apache.yml new file mode 100644 index 0000000..3f7996d --- /dev/null +++ b/refactoring/install_apache.yml @@ -0,0 +1,15 @@ +--- +- hosts: all + become: true + tasks: + +#### Ubuntu/Debian Section #### + + - name: Install apache2 package with php support + package: + name: + - "{{ apache_package }}" + - "{{ php_package }}" + state: latest + update_cache: yes + diff --git a/refactoring/inventory b/refactoring/inventory new file mode 100644 index 0000000..c4f06f4 --- /dev/null +++ b/refactoring/inventory @@ -0,0 +1,4 @@ +10.0.0.5 apache_package=httpd php_package=php +10.0.0.7 apache_package=apache2 php_package=libapache2-mod-php +10.0.0.8 apache_package=apache2 php_package=libapache2-mod-php +10.0.0.11 apache_package=httpd php_package=php