From d73c37dc9e2f2a909fa6004c8b305d49c8786df4 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Wed, 27 May 2026 19:05:49 +0200 Subject: [PATCH] First try --- ansible/inventories/automotive.yaml | 7 +++++ ansible/inventories/group_vars/all/vault.yaml | 19 +++++++----- .../group_vars/automotive/automotive.yaml | 11 +++++++ ansible/playbooks/wordpress.yaml | 13 ++++++++ ansible/requirements.yml | 30 +++++++++++++++++++ 5 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 ansible/inventories/automotive.yaml create mode 100644 ansible/inventories/group_vars/automotive/automotive.yaml create mode 100644 ansible/playbooks/wordpress.yaml create mode 100644 ansible/requirements.yml diff --git a/ansible/inventories/automotive.yaml b/ansible/inventories/automotive.yaml new file mode 100644 index 0000000..9d0b4e5 --- /dev/null +++ b/ansible/inventories/automotive.yaml @@ -0,0 +1,7 @@ +--- +automotive: + children: + web: + hosts: + automotive.sse.cloud.isti.cnr.it: + #automotive2.sse.cloud.isti.cnr.it: \ No newline at end of file diff --git a/ansible/inventories/group_vars/all/vault.yaml b/ansible/inventories/group_vars/all/vault.yaml index 599e322..ae4f465 100644 --- a/ansible/inventories/group_vars/all/vault.yaml +++ b/ansible/inventories/group_vars/all/vault.yaml @@ -1,9 +1,12 @@ $ANSIBLE_VAULT;1.1;AES256 -36323030396532326432653332633031386532393564653565623231343037376432626337353666 -3136663234656635613337653036356366363431346263630a313034633838663263663662653639 -64333761373334633465363632646366656430626362623630343830383735663830303462623630 -6465323036343965640a393536313637623930613431643962613237363733653163613366643837 -64616462626165396632353365666334363035393864386534363831643631646530663739323538 -61646635343264393737336666653330383863623362663166306632653939376463653362363431 -33366334306330643266303730653863633363303964316361626665363262343833323063343932 -31313938626338326431 +34353564303462326566326536303539333538303138356630316163613538383033353166396231 +3830643839333330373965323333656666333833653266650a656261663234363434336430343663 +38616130346632303664393162326463663866333765623739393961663135616432333862623539 +3039333232653938350a383565313339316339646634643532306135383365326230363063636533 +65393862643563616162663533303633343732656465666133353862396464373265343137376438 +36363034333565626261376665643033616366643431343432653261646132323463633838626439 +39386266346664346135333966613862636336343837383163336366623763313737306537353233 +35323566653939643831663234323637373631316436653165653332613030346331353365303834 +34656535633063626233373432653830306364323035626135623231363739383235343734656463 +64333134626333323032313431613235306538383735323364326235306564356138343061353935 +396263386437613738643465313161323337 diff --git a/ansible/inventories/group_vars/automotive/automotive.yaml b/ansible/inventories/group_vars/automotive/automotive.yaml new file mode 100644 index 0000000..6f41e65 --- /dev/null +++ b/ansible/inventories/group_vars/automotive/automotive.yaml @@ -0,0 +1,11 @@ +--- +web_projects_dir: /var/www/demosifisite +wordpress_site_name: demosifisite +wordpress_domain_name: beta.demosifisite.isti.cnr.it + +wordpress_database_server: localhost +wordpress_database_port: 3306 +wordpress_database_name: wp_demosifisite +wordpress_database_username: demosifisite +wordpress_database_password: "{{ automotive_demosifisite_mysql_password }}" +wordpress_version: 6.4 \ No newline at end of file diff --git a/ansible/playbooks/wordpress.yaml b/ansible/playbooks/wordpress.yaml new file mode 100644 index 0000000..22bcfd1 --- /dev/null +++ b/ansible/playbooks/wordpress.yaml @@ -0,0 +1,13 @@ +--- +- name: Install and configure Wordpress + hosts: all + collections: + - iamgini.wordpress + + become : True + + roles: + - ufw_install + - nginx_install + - wordpress_install + diff --git a/ansible/requirements.yml b/ansible/requirements.yml new file mode 100644 index 0000000..0e4f684 --- /dev/null +++ b/ansible/requirements.yml @@ -0,0 +1,30 @@ +# requirements.yml +--- +roles: + # - name: bodsch.dns.bind + # version: + + # - name: nginx + # src: git@github.com:myorg/ansible-role-nginx.git + # scm: git + # version: v2.0.0 + +collections: + - name: bodsch.dns + source: https://github.com/bodsch/ansible-collection-dns.git + type: git + version: 1.4.1 + + - name: dsglaser.cis_security + version: 1.5.4 + + - name: iamgini.wordpress + version: 1.0.0 + + # - name: community.postgresql + # version: "3.2.0" + # - name: ansible.posix + # version: "1.5.4" + # - name: myorg.infrastructure + # source: https://hub.internal.com/api/galaxy/ + # version: "1.0.0"