From 7ba09982cd0fa298f27ff5a3c3ce2dafd72e8a0e Mon Sep 17 00:00:00 2001 From: AdriBreez Date: Tue, 18 Aug 2020 07:42:39 +0200 Subject: [PATCH] Initial commit --- ansible_deploy_all.sh | 5 + ansible_deploy_nfs.sh | 2 + group_vars/Esxi | 4 + group_vars/Gsmc | 3 + group_vars/NFS_try | 4 + group_vars/POCP | 4 + group_vars/Terraform | 4 + group_vars/clients | 3 + group_vars/clients_nfs | 3 + group_vars/ldap | 3 + group_vars/prueba | 3 + group_vars/server | 3 + group_vars/server_nfs | 3 + hosts/Gsmc | 9 ++ inventory/Gsmc | 51 +++++++ playbooks/afick-install.yml | 5 + playbooks/configure_server_Gsmc.yml | 29 ++++ playbooks/esxi_stop.yml | 5 + playbooks/esxi_try.yml | 6 + playbooks/hostname-change.yml | 5 + playbooks/install_acronis.yml | 7 + playbooks/nfs_try.yml | 5 + playbooks/prueba_server1.yml | 5 + playbooks/pruebas_carpetas.yml | 5 + playbooks/svn_prueba.yml | 3 + roles/Acronis_Clients/.travis.yml | 29 ++++ roles/Acronis_Clients/README.md | 38 +++++ roles/Acronis_Clients/defaults/main.yml | 2 + roles/Acronis_Clients/handlers/main.yml | 2 + roles/Acronis_Clients/meta/main.yml | 53 +++++++ roles/Acronis_Clients/tasks/main.yml | 5 + roles/Acronis_Clients/tests/inventory | 2 + roles/Acronis_Clients/tests/test.yml | 5 + roles/Acronis_Clients/vars/main.yml | 2 + roles/Acronis_Clients/varsÂsain.yml | 4 + roles/Acronis_Server/.travis.yml | 29 ++++ roles/Acronis_Server/README.md | 38 +++++ roles/Acronis_Server/defaults/main.yml | 2 + roles/Acronis_Server/handlers/main.yml | 2 + roles/Acronis_Server/meta/main.yml | 53 +++++++ roles/Acronis_Server/tasks/main.yml | 5 + roles/Acronis_Server/tests/inventory | 2 + roles/Acronis_Server/tests/test.yml | 5 + roles/Acronis_Server/vars/main.yml | 2 + roles/Afick_Install/.travis.yml | 29 ++++ roles/Afick_Install/README.md | 38 +++++ roles/Afick_Install/defaults/main.yml | 2 + roles/Afick_Install/handlers/main.yml | 2 + roles/Afick_Install/meta/main.yml | 53 +++++++ roles/Afick_Install/tasks/main.yml | 16 ++ roles/Afick_Install/tests/inventory | 2 + roles/Afick_Install/tests/test.yml | 5 + roles/Afick_Install/vars/main.yml | 2 + roles/Apache_Install/.travis.yml | 29 ++++ roles/Apache_Install/README.md | 38 +++++ roles/Apache_Install/defaults/main.yml | 2 + roles/Apache_Install/handlers/main.yml | 2 + roles/Apache_Install/meta/main.yml | 53 +++++++ roles/Apache_Install/tasks/main.yml | 10 ++ roles/Apache_Install/tests/inventory | 2 + roles/Apache_Install/tests/test.yml | 5 + roles/Apache_Install/vars/main.yml | 2 + roles/Asterix_Install/.travis.yml | 29 ++++ roles/Asterix_Install/README.md | 38 +++++ roles/Asterix_Install/defaults/main.yml | 2 + roles/Asterix_Install/files/media.repo | 9 ++ roles/Asterix_Install/handlers/main.yml | 2 + roles/Asterix_Install/meta/main.yml | 53 +++++++ roles/Asterix_Install/tasks/main.yml | 65 ++++++++ roles/Asterix_Install/tests/inventory | 2 + roles/Asterix_Install/tests/test.yml | 5 + roles/Asterix_Install/vars/main.yml | 2 + roles/Configure_Hostname/.travis.yml | 29 ++++ roles/Configure_Hostname/README.md | 38 +++++ roles/Configure_Hostname/defaults/main.yml | 2 + roles/Configure_Hostname/handlers/main.yml | 2 + roles/Configure_Hostname/meta/main.yml | 53 +++++++ roles/Configure_Hostname/tasks/main.yml | 15 ++ roles/Configure_Hostname/tests/inventory | 2 + roles/Configure_Hostname/tests/test.yml | 5 + roles/Configure_Hostname/vars/main.yml | 3 + roles/Git_Repo/README.md | 38 +++++ roles/Git_Repo/defaults/main.yml | 2 + roles/Git_Repo/files/media.repo | 9 ++ roles/Git_Repo/files/redhat.repo | 8 + roles/Git_Repo/handlers/main.yml | 2 + roles/Git_Repo/meta/main.yml | 53 +++++++ roles/Git_Repo/tasks/main.yml | 7 + roles/Git_Repo/tests/inventory | 2 + roles/Git_Repo/tests/test.yml | 5 + roles/Git_Repo/vars/main.yml | 2 + roles/Git_client/README.md | 38 +++++ roles/Git_client/defaults/main.yml | 2 + roles/Git_client/files/media.repo | 9 ++ roles/Git_client/files/redhat.repo | 8 + roles/Git_client/handlers/main.yml | 2 + roles/Git_client/meta/main.yml | 53 +++++++ roles/Git_client/tasks/main.yml | 8 + roles/Git_client/tests/inventory | 2 + roles/Git_client/tests/test.yml | 5 + roles/Git_client/vars/main.yml | 2 + roles/IPA_clients_install/.travis.yml | 29 ++++ roles/IPA_clients_install/README.md | 38 +++++ roles/IPA_clients_install/defaults/main.yml | 2 + .../files/lista_de_usuarios_ldap | 2 + roles/IPA_clients_install/files/user_1 | 3 + roles/IPA_clients_install/files/user_10 | 3 + roles/IPA_clients_install/files/user_11 | 3 + roles/IPA_clients_install/files/user_12 | 3 + roles/IPA_clients_install/files/user_13 | 3 + roles/IPA_clients_install/files/user_14 | 3 + roles/IPA_clients_install/files/user_15 | 3 + roles/IPA_clients_install/files/user_2 | 3 + roles/IPA_clients_install/files/user_3 | 3 + roles/IPA_clients_install/files/user_4 | 3 + roles/IPA_clients_install/files/user_5 | 3 + roles/IPA_clients_install/files/user_6 | 3 + roles/IPA_clients_install/files/user_7 | 3 + roles/IPA_clients_install/files/user_8 | 3 + roles/IPA_clients_install/files/user_9 | 3 + .../IPA_clients_install/files/view_users_ldap | 4 + roles/IPA_clients_install/handlers/main.yml | 2 + roles/IPA_clients_install/meta/main.yml | 53 +++++++ roles/IPA_clients_install/tasks/main.yml | 7 + roles/IPA_clients_install/tests/inventory | 2 + roles/IPA_clients_install/tests/test.yml | 5 + roles/IPA_clients_install/vars/main.yml | 3 + roles/IPA_clients_install/vars/user_list | 2 + roles/IPA_server_install/.travis.yml | 29 ++++ roles/IPA_server_install/README.md | 38 +++++ roles/IPA_server_install/defaults/main.yml | 2 + roles/IPA_server_install/handlers/main.yml | 2 + roles/IPA_server_install/meta/main.yml | 53 +++++++ roles/IPA_server_install/tasks/main.yml | 27 ++++ roles/IPA_server_install/tests/inventory | 2 + roles/IPA_server_install/tests/test.yml | 5 + roles/IPA_server_install/vars/main.yml | 6 + roles/Mount_BBDD/.travis.yml | 29 ++++ roles/Mount_BBDD/README.md | 38 +++++ roles/Mount_BBDD/defaults/main.yml | 2 + roles/Mount_BBDD/handlers/main.yml | 2 + roles/Mount_BBDD/meta/main.yml | 53 +++++++ roles/Mount_BBDD/tasks/main.yml | 9 ++ roles/Mount_BBDD/tests/inventory | 2 + roles/Mount_BBDD/tests/test.yml | 5 + roles/Mount_BBDD/vars/main.yml | 2 + roles/NFS-Server/.travis.yml | 29 ++++ roles/NFS-Server/README.md | 38 +++++ roles/NFS-Server/defaults/main.yml | 2 + roles/NFS-Server/files/media.repo | 9 ++ roles/NFS-Server/handlers/main.yml | 2 + roles/NFS-Server/meta/main.yml | 53 +++++++ roles/NFS-Server/tasks/main.yml | 22 +++ roles/NFS-Server/tests/inventory | 2 + roles/NFS-Server/tests/test.yml | 5 + roles/NFS-Server/vars/main.yml | 2 + roles/NFS_mount/.travis.yml | 29 ++++ roles/NFS_mount/README.md | 38 +++++ roles/NFS_mount/defaults/main.yml | 2 + roles/NFS_mount/files/media.repo | 9 ++ roles/NFS_mount/files/redhat.repo | 8 + roles/NFS_mount/handlers/main.yml | 2 + roles/NFS_mount/meta/main.yml | 53 +++++++ roles/NFS_mount/tasks/main.yml | 24 +++ roles/NFS_mount/tests/inventory | 2 + roles/NFS_mount/tests/test.yml | 5 + roles/NFS_mount/vars/main.yml | 2 + roles/Nginx_Install/.travis.yml | 29 ++++ roles/Nginx_Install/README.md | 38 +++++ roles/Nginx_Install/defaults/main.yml | 2 + roles/Nginx_Install/handlers/main.yml | 2 + roles/Nginx_Install/meta/main.yml | 53 +++++++ roles/Nginx_Install/tasks/main.yml | 10 ++ roles/Nginx_Install/tests/inventory | 2 + roles/Nginx_Install/tests/test.yml | 5 + roles/Nginx_Install/vars/main.yml | 2 + roles/Postfix_Install/.travis.yml | 29 ++++ roles/Postfix_Install/README.md | 38 +++++ roles/Postfix_Install/defaults/main.yml | 2 + roles/Postfix_Install/handlers/main.yml | 2 + roles/Postfix_Install/meta/main.yml | 53 +++++++ roles/Postfix_Install/tasks/main.yml | 30 ++++ roles/Postfix_Install/tests/inventory | 2 + roles/Postfix_Install/tests/test.yml | 5 + roles/Postfix_Install/vars/main.yml | 2 + roles/Pre_NFS/README.md | 38 +++++ roles/Pre_NFS/defaults/main.yml | 2 + roles/Pre_NFS/files/media.repo | 9 ++ roles/Pre_NFS/files/redhat.repo | 8 + roles/Pre_NFS/handlers/main.yml | 2 + roles/Pre_NFS/meta/main.yml | 53 +++++++ roles/Pre_NFS/tasks/main.yml | 11 ++ roles/Pre_NFS/tests/inventory | 2 + roles/Pre_NFS/tests/test.yml | 5 + roles/Pre_NFS/vars/main.yml | 2 + roles/esxi_create/README.md | 38 +++++ roles/esxi_create/defaults/main.yml | 2 + roles/esxi_create/handlers/main.yml | 2 + roles/esxi_create/meta/main.yml | 57 +++++++ roles/esxi_create/tasks/main.yml | 144 ++++++++++++++++++ roles/esxi_create/tests/inventory | 2 + roles/esxi_create/tests/test.yml | 5 + roles/esxi_create/vars/main.yml | 15 ++ roles/esxi_delete/README.md | 38 +++++ roles/esxi_delete/defaults/main.yml | 2 + roles/esxi_delete/handlers/main.yml | 2 + roles/esxi_delete/meta/main.yml | 53 +++++++ roles/esxi_delete/tasks/main.yml | 67 ++++++++ roles/esxi_delete/tests/inventory | 2 + roles/esxi_delete/tests/test.yml | 5 + roles/esxi_delete/vars/main.yml | 15 ++ roles/esxi_stop/README.md | 38 +++++ roles/esxi_stop/defaults/main.yml | 2 + roles/esxi_stop/handlers/main.yml | 2 + roles/esxi_stop/meta/main.yml | 57 +++++++ roles/esxi_stop/tasks/main.yml | 67 ++++++++ roles/esxi_stop/tests/inventory | 2 + roles/esxi_stop/tests/test.yml | 5 + roles/esxi_stop/vars/main.yml | 15 ++ 219 files changed, 3277 insertions(+) create mode 100755 ansible_deploy_all.sh create mode 100755 ansible_deploy_nfs.sh create mode 100755 group_vars/Esxi create mode 100755 group_vars/Gsmc create mode 100755 group_vars/NFS_try create mode 100755 group_vars/POCP create mode 100755 group_vars/Terraform create mode 100755 group_vars/clients create mode 100755 group_vars/clients_nfs create mode 100755 group_vars/ldap create mode 100755 group_vars/prueba create mode 100755 group_vars/server create mode 100755 group_vars/server_nfs create mode 100755 hosts/Gsmc create mode 100755 inventory/Gsmc create mode 100755 playbooks/afick-install.yml create mode 100755 playbooks/configure_server_Gsmc.yml create mode 100755 playbooks/esxi_stop.yml create mode 100755 playbooks/esxi_try.yml create mode 100755 playbooks/hostname-change.yml create mode 100755 playbooks/install_acronis.yml create mode 100755 playbooks/nfs_try.yml create mode 100755 playbooks/prueba_server1.yml create mode 100755 playbooks/pruebas_carpetas.yml create mode 100755 playbooks/svn_prueba.yml create mode 100755 roles/Acronis_Clients/.travis.yml create mode 100755 roles/Acronis_Clients/README.md create mode 100755 roles/Acronis_Clients/defaults/main.yml create mode 100755 roles/Acronis_Clients/handlers/main.yml create mode 100755 roles/Acronis_Clients/meta/main.yml create mode 100755 roles/Acronis_Clients/tasks/main.yml create mode 100755 roles/Acronis_Clients/tests/inventory create mode 100755 roles/Acronis_Clients/tests/test.yml create mode 100755 roles/Acronis_Clients/vars/main.yml create mode 100755 roles/Acronis_Clients/varsÂsain.yml create mode 100755 roles/Acronis_Server/.travis.yml create mode 100755 roles/Acronis_Server/README.md create mode 100755 roles/Acronis_Server/defaults/main.yml create mode 100755 roles/Acronis_Server/handlers/main.yml create mode 100755 roles/Acronis_Server/meta/main.yml create mode 100755 roles/Acronis_Server/tasks/main.yml create mode 100755 roles/Acronis_Server/tests/inventory create mode 100755 roles/Acronis_Server/tests/test.yml create mode 100755 roles/Acronis_Server/vars/main.yml create mode 100755 roles/Afick_Install/.travis.yml create mode 100755 roles/Afick_Install/README.md create mode 100755 roles/Afick_Install/defaults/main.yml create mode 100755 roles/Afick_Install/handlers/main.yml create mode 100755 roles/Afick_Install/meta/main.yml create mode 100755 roles/Afick_Install/tasks/main.yml create mode 100755 roles/Afick_Install/tests/inventory create mode 100755 roles/Afick_Install/tests/test.yml create mode 100755 roles/Afick_Install/vars/main.yml create mode 100755 roles/Apache_Install/.travis.yml create mode 100755 roles/Apache_Install/README.md create mode 100755 roles/Apache_Install/defaults/main.yml create mode 100755 roles/Apache_Install/handlers/main.yml create mode 100755 roles/Apache_Install/meta/main.yml create mode 100755 roles/Apache_Install/tasks/main.yml create mode 100755 roles/Apache_Install/tests/inventory create mode 100755 roles/Apache_Install/tests/test.yml create mode 100755 roles/Apache_Install/vars/main.yml create mode 100755 roles/Asterix_Install/.travis.yml create mode 100755 roles/Asterix_Install/README.md create mode 100755 roles/Asterix_Install/defaults/main.yml create mode 100755 roles/Asterix_Install/files/media.repo create mode 100755 roles/Asterix_Install/handlers/main.yml create mode 100755 roles/Asterix_Install/meta/main.yml create mode 100755 roles/Asterix_Install/tasks/main.yml create mode 100755 roles/Asterix_Install/tests/inventory create mode 100755 roles/Asterix_Install/tests/test.yml create mode 100755 roles/Asterix_Install/vars/main.yml create mode 100755 roles/Configure_Hostname/.travis.yml create mode 100755 roles/Configure_Hostname/README.md create mode 100755 roles/Configure_Hostname/defaults/main.yml create mode 100755 roles/Configure_Hostname/handlers/main.yml create mode 100755 roles/Configure_Hostname/meta/main.yml create mode 100755 roles/Configure_Hostname/tasks/main.yml create mode 100755 roles/Configure_Hostname/tests/inventory create mode 100755 roles/Configure_Hostname/tests/test.yml create mode 100755 roles/Configure_Hostname/vars/main.yml create mode 100755 roles/Git_Repo/README.md create mode 100755 roles/Git_Repo/defaults/main.yml create mode 100755 roles/Git_Repo/files/media.repo create mode 100755 roles/Git_Repo/files/redhat.repo create mode 100755 roles/Git_Repo/handlers/main.yml create mode 100755 roles/Git_Repo/meta/main.yml create mode 100755 roles/Git_Repo/tasks/main.yml create mode 100755 roles/Git_Repo/tests/inventory create mode 100755 roles/Git_Repo/tests/test.yml create mode 100755 roles/Git_Repo/vars/main.yml create mode 100755 roles/Git_client/README.md create mode 100755 roles/Git_client/defaults/main.yml create mode 100755 roles/Git_client/files/media.repo create mode 100755 roles/Git_client/files/redhat.repo create mode 100755 roles/Git_client/handlers/main.yml create mode 100755 roles/Git_client/meta/main.yml create mode 100755 roles/Git_client/tasks/main.yml create mode 100755 roles/Git_client/tests/inventory create mode 100755 roles/Git_client/tests/test.yml create mode 100755 roles/Git_client/vars/main.yml create mode 100755 roles/IPA_clients_install/.travis.yml create mode 100755 roles/IPA_clients_install/README.md create mode 100755 roles/IPA_clients_install/defaults/main.yml create mode 100755 roles/IPA_clients_install/files/lista_de_usuarios_ldap create mode 100755 roles/IPA_clients_install/files/user_1 create mode 100755 roles/IPA_clients_install/files/user_10 create mode 100755 roles/IPA_clients_install/files/user_11 create mode 100755 roles/IPA_clients_install/files/user_12 create mode 100755 roles/IPA_clients_install/files/user_13 create mode 100755 roles/IPA_clients_install/files/user_14 create mode 100755 roles/IPA_clients_install/files/user_15 create mode 100755 roles/IPA_clients_install/files/user_2 create mode 100755 roles/IPA_clients_install/files/user_3 create mode 100755 roles/IPA_clients_install/files/user_4 create mode 100755 roles/IPA_clients_install/files/user_5 create mode 100755 roles/IPA_clients_install/files/user_6 create mode 100755 roles/IPA_clients_install/files/user_7 create mode 100755 roles/IPA_clients_install/files/user_8 create mode 100755 roles/IPA_clients_install/files/user_9 create mode 100755 roles/IPA_clients_install/files/view_users_ldap create mode 100755 roles/IPA_clients_install/handlers/main.yml create mode 100755 roles/IPA_clients_install/meta/main.yml create mode 100755 roles/IPA_clients_install/tasks/main.yml create mode 100755 roles/IPA_clients_install/tests/inventory create mode 100755 roles/IPA_clients_install/tests/test.yml create mode 100755 roles/IPA_clients_install/vars/main.yml create mode 100755 roles/IPA_clients_install/vars/user_list create mode 100755 roles/IPA_server_install/.travis.yml create mode 100755 roles/IPA_server_install/README.md create mode 100755 roles/IPA_server_install/defaults/main.yml create mode 100755 roles/IPA_server_install/handlers/main.yml create mode 100755 roles/IPA_server_install/meta/main.yml create mode 100755 roles/IPA_server_install/tasks/main.yml create mode 100755 roles/IPA_server_install/tests/inventory create mode 100755 roles/IPA_server_install/tests/test.yml create mode 100755 roles/IPA_server_install/vars/main.yml create mode 100755 roles/Mount_BBDD/.travis.yml create mode 100755 roles/Mount_BBDD/README.md create mode 100755 roles/Mount_BBDD/defaults/main.yml create mode 100755 roles/Mount_BBDD/handlers/main.yml create mode 100755 roles/Mount_BBDD/meta/main.yml create mode 100755 roles/Mount_BBDD/tasks/main.yml create mode 100755 roles/Mount_BBDD/tests/inventory create mode 100755 roles/Mount_BBDD/tests/test.yml create mode 100755 roles/Mount_BBDD/vars/main.yml create mode 100755 roles/NFS-Server/.travis.yml create mode 100755 roles/NFS-Server/README.md create mode 100755 roles/NFS-Server/defaults/main.yml create mode 100755 roles/NFS-Server/files/media.repo create mode 100755 roles/NFS-Server/handlers/main.yml create mode 100755 roles/NFS-Server/meta/main.yml create mode 100755 roles/NFS-Server/tasks/main.yml create mode 100755 roles/NFS-Server/tests/inventory create mode 100755 roles/NFS-Server/tests/test.yml create mode 100755 roles/NFS-Server/vars/main.yml create mode 100755 roles/NFS_mount/.travis.yml create mode 100755 roles/NFS_mount/README.md create mode 100755 roles/NFS_mount/defaults/main.yml create mode 100755 roles/NFS_mount/files/media.repo create mode 100755 roles/NFS_mount/files/redhat.repo create mode 100755 roles/NFS_mount/handlers/main.yml create mode 100755 roles/NFS_mount/meta/main.yml create mode 100755 roles/NFS_mount/tasks/main.yml create mode 100755 roles/NFS_mount/tests/inventory create mode 100755 roles/NFS_mount/tests/test.yml create mode 100755 roles/NFS_mount/vars/main.yml create mode 100755 roles/Nginx_Install/.travis.yml create mode 100755 roles/Nginx_Install/README.md create mode 100755 roles/Nginx_Install/defaults/main.yml create mode 100755 roles/Nginx_Install/handlers/main.yml create mode 100755 roles/Nginx_Install/meta/main.yml create mode 100755 roles/Nginx_Install/tasks/main.yml create mode 100755 roles/Nginx_Install/tests/inventory create mode 100755 roles/Nginx_Install/tests/test.yml create mode 100755 roles/Nginx_Install/vars/main.yml create mode 100755 roles/Postfix_Install/.travis.yml create mode 100755 roles/Postfix_Install/README.md create mode 100755 roles/Postfix_Install/defaults/main.yml create mode 100755 roles/Postfix_Install/handlers/main.yml create mode 100755 roles/Postfix_Install/meta/main.yml create mode 100755 roles/Postfix_Install/tasks/main.yml create mode 100755 roles/Postfix_Install/tests/inventory create mode 100755 roles/Postfix_Install/tests/test.yml create mode 100755 roles/Postfix_Install/vars/main.yml create mode 100755 roles/Pre_NFS/README.md create mode 100755 roles/Pre_NFS/defaults/main.yml create mode 100755 roles/Pre_NFS/files/media.repo create mode 100755 roles/Pre_NFS/files/redhat.repo create mode 100755 roles/Pre_NFS/handlers/main.yml create mode 100755 roles/Pre_NFS/meta/main.yml create mode 100755 roles/Pre_NFS/tasks/main.yml create mode 100755 roles/Pre_NFS/tests/inventory create mode 100755 roles/Pre_NFS/tests/test.yml create mode 100755 roles/Pre_NFS/vars/main.yml create mode 100755 roles/esxi_create/README.md create mode 100755 roles/esxi_create/defaults/main.yml create mode 100755 roles/esxi_create/handlers/main.yml create mode 100755 roles/esxi_create/meta/main.yml create mode 100755 roles/esxi_create/tasks/main.yml create mode 100755 roles/esxi_create/tests/inventory create mode 100755 roles/esxi_create/tests/test.yml create mode 100755 roles/esxi_create/vars/main.yml create mode 100755 roles/esxi_delete/README.md create mode 100755 roles/esxi_delete/defaults/main.yml create mode 100755 roles/esxi_delete/handlers/main.yml create mode 100755 roles/esxi_delete/meta/main.yml create mode 100755 roles/esxi_delete/tasks/main.yml create mode 100755 roles/esxi_delete/tests/inventory create mode 100755 roles/esxi_delete/tests/test.yml create mode 100755 roles/esxi_delete/vars/main.yml create mode 100755 roles/esxi_stop/README.md create mode 100755 roles/esxi_stop/defaults/main.yml create mode 100755 roles/esxi_stop/handlers/main.yml create mode 100755 roles/esxi_stop/meta/main.yml create mode 100755 roles/esxi_stop/tasks/main.yml create mode 100755 roles/esxi_stop/tests/inventory create mode 100755 roles/esxi_stop/tests/test.yml create mode 100755 roles/esxi_stop/vars/main.yml diff --git a/ansible_deploy_all.sh b/ansible_deploy_all.sh new file mode 100755 index 0000000..d4e9a57 --- /dev/null +++ b/ansible_deploy_all.sh @@ -0,0 +1,5 @@ +#!bin/bash +ansible-playbook -i inventory/Gsmc playbooks/esxi_stop.yml +ansible-playbook -i inventory/Gsmc playbooks/esxi_try.yml +sleep 30 +./ansible_deploy_nfs.sh diff --git a/ansible_deploy_nfs.sh b/ansible_deploy_nfs.sh new file mode 100755 index 0000000..2ade2a5 --- /dev/null +++ b/ansible_deploy_nfs.sh @@ -0,0 +1,2 @@ +ansible-playbook -i inventory/Gsmc playbooks/nfs_try.yml + diff --git a/group_vars/Esxi b/group_vars/Esxi new file mode 100755 index 0000000..d3fd9dd --- /dev/null +++ b/group_vars/Esxi @@ -0,0 +1,4 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: GsmcGmv2Gmv* + diff --git a/group_vars/Gsmc b/group_vars/Gsmc new file mode 100755 index 0000000..7d2448d --- /dev/null +++ b/group_vars/Gsmc @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: gmv2gmv diff --git a/group_vars/NFS_try b/group_vars/NFS_try new file mode 100755 index 0000000..d3fd9dd --- /dev/null +++ b/group_vars/NFS_try @@ -0,0 +1,4 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: GsmcGmv2Gmv* + diff --git a/group_vars/POCP b/group_vars/POCP new file mode 100755 index 0000000..d3fd9dd --- /dev/null +++ b/group_vars/POCP @@ -0,0 +1,4 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: GsmcGmv2Gmv* + diff --git a/group_vars/Terraform b/group_vars/Terraform new file mode 100755 index 0000000..d3fd9dd --- /dev/null +++ b/group_vars/Terraform @@ -0,0 +1,4 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: GsmcGmv2Gmv* + diff --git a/group_vars/clients b/group_vars/clients new file mode 100755 index 0000000..7d2448d --- /dev/null +++ b/group_vars/clients @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: gmv2gmv diff --git a/group_vars/clients_nfs b/group_vars/clients_nfs new file mode 100755 index 0000000..7d2448d --- /dev/null +++ b/group_vars/clients_nfs @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: gmv2gmv diff --git a/group_vars/ldap b/group_vars/ldap new file mode 100755 index 0000000..7d2448d --- /dev/null +++ b/group_vars/ldap @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: gmv2gmv diff --git a/group_vars/prueba b/group_vars/prueba new file mode 100755 index 0000000..7d2448d --- /dev/null +++ b/group_vars/prueba @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: gmv2gmv diff --git a/group_vars/server b/group_vars/server new file mode 100755 index 0000000..7d2448d --- /dev/null +++ b/group_vars/server @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: gmv2gmv diff --git a/group_vars/server_nfs b/group_vars/server_nfs new file mode 100755 index 0000000..7fc9f5b --- /dev/null +++ b/group_vars/server_nfs @@ -0,0 +1,3 @@ +ansible_connection: ssh +ansible_user: root +ansible_password: GsmcGmv2Gmv* diff --git a/hosts/Gsmc b/hosts/Gsmc new file mode 100755 index 0000000..79b64c4 --- /dev/null +++ b/hosts/Gsmc @@ -0,0 +1,9 @@ +[gsmc] +172.17.22.170 hostname_suffix=gsmc1 +[gsmc:vars] +ansible_connection=ssh +ansible_user=root +ansible_password=gmv2gmv +preffix=gsmc.com +[Esxi] +ansible_ssh_transfer_method=scp diff --git a/inventory/Gsmc b/inventory/Gsmc new file mode 100755 index 0000000..40cc328 --- /dev/null +++ b/inventory/Gsmc @@ -0,0 +1,51 @@ +[gsmc] +172.17.22.170 hostname_suffix=gsmc1 +172.17.22.171 hostname_suffix=gsmc2 +172.17.22.172 hostname_suffix=gsmc3 +172.17.22.173 hostname_suffix=gsmc4 +172.17.22.174 hostname_suffix=gsmc5 +172.17.22.175 hostname_suffix=gsmc6 +172.17.22.176 hostname_suffix=gsmc7 +172.17.22.177 hostname_suffix=gsmc8 +[Git_Server] +172.17.22.175 +[Git_Clients] +[IPA_server] +172.17.22.174 +[IPA_server:vars] +hostname=gsmc5.gsmc.com +[IPA_clients] +172.17.22.170 +172.17.22.172 +172.17.22.173 +172.17.22.175 +172.17.22.176 +172.17.22.177 +172.17.22.171 +[server_nfs] +35.54.20.230 +[clients_nfs] +35.54.20.9 +35.54.20.8 +35.54.20.11 +35.54.20.7 +35.54.20.2 +35.54.20.14 +[SVN_Prueba] +172.17.22.170 +[Acronis_Server] +172.17.22.175 +[Acronis_Clients] +[Esxi] +192.168.110.10 +[Terraform] +35.54.0.230 +[POCP] +35.54.20.9 +35.54.20.8 +35.54.20.11 +35.54.20.7 +35.54.20.2 +35.54.20.14 +[NFS_try] +35.54.20.11 diff --git a/playbooks/afick-install.yml b/playbooks/afick-install.yml new file mode 100755 index 0000000..136a2b1 --- /dev/null +++ b/playbooks/afick-install.yml @@ -0,0 +1,5 @@ +--- +- hosts: all + roles: + - NFS_mount + - Afick_Install diff --git a/playbooks/configure_server_Gsmc.yml b/playbooks/configure_server_Gsmc.yml new file mode 100755 index 0000000..e2ab341 --- /dev/null +++ b/playbooks/configure_server_Gsmc.yml @@ -0,0 +1,29 @@ +--- +- hosts: gsmc + roles: + - Configure_Hostname +- hosts: server_nfs + roles: + - NFS-Server +- hosts: clients_nfs + roles: + - NFS_mount +- hosts: SVN_Server + roles: + - SVN +- hosts: IPA_server + roles: + - IPA_server_install +- hosts: IPA_clients + roles: + - IPA_clients_install +- hosts: all + roles: + - Afick_Install +- hosts: Acronis_Server + roles: + - Acronis_Server +- hosts: Acronis_Clients + roles: + - Acronis_Clients + diff --git a/playbooks/esxi_stop.yml b/playbooks/esxi_stop.yml new file mode 100755 index 0000000..93dd45a --- /dev/null +++ b/playbooks/esxi_stop.yml @@ -0,0 +1,5 @@ +--- +- hosts: Esxi + roles: + - esxi_stop + - esxi_delete diff --git a/playbooks/esxi_try.yml b/playbooks/esxi_try.yml new file mode 100755 index 0000000..c63c46e --- /dev/null +++ b/playbooks/esxi_try.yml @@ -0,0 +1,6 @@ +--- +- hosts: Esxi + roles: + - esxi_try + + diff --git a/playbooks/hostname-change.yml b/playbooks/hostname-change.yml new file mode 100755 index 0000000..e808513 --- /dev/null +++ b/playbooks/hostname-change.yml @@ -0,0 +1,5 @@ +--- +- hosts: gsmc + roles: + - Configure_Hostname + diff --git a/playbooks/install_acronis.yml b/playbooks/install_acronis.yml new file mode 100755 index 0000000..333dfd3 --- /dev/null +++ b/playbooks/install_acronis.yml @@ -0,0 +1,7 @@ +--- +- hosts: Acronis_Server + roles: + - Acronis_Server +- hosts: Acronis_Clients + roles: + - Acronis_Clients diff --git a/playbooks/nfs_try.yml b/playbooks/nfs_try.yml new file mode 100755 index 0000000..e73befe --- /dev/null +++ b/playbooks/nfs_try.yml @@ -0,0 +1,5 @@ +--- +- hosts: clients_nfs + roles: + - NFS_mount + diff --git a/playbooks/prueba_server1.yml b/playbooks/prueba_server1.yml new file mode 100755 index 0000000..042a007 --- /dev/null +++ b/playbooks/prueba_server1.yml @@ -0,0 +1,5 @@ +--- +- hosts: all + roles: + - NFS_mount + - LDAP_create diff --git a/playbooks/pruebas_carpetas.yml b/playbooks/pruebas_carpetas.yml new file mode 100755 index 0000000..4d9b198 --- /dev/null +++ b/playbooks/pruebas_carpetas.yml @@ -0,0 +1,5 @@ +--- +- hosts: Gsmc + roles: + - LDAP_Create + diff --git a/playbooks/svn_prueba.yml b/playbooks/svn_prueba.yml new file mode 100755 index 0000000..2b0ed66 --- /dev/null +++ b/playbooks/svn_prueba.yml @@ -0,0 +1,3 @@ +- hosts: SVN_Prueba + roles: + - SVN diff --git a/roles/Acronis_Clients/.travis.yml b/roles/Acronis_Clients/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Acronis_Clients/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Acronis_Clients/README.md b/roles/Acronis_Clients/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Acronis_Clients/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Acronis_Clients/defaults/main.yml b/roles/Acronis_Clients/defaults/main.yml new file mode 100755 index 0000000..a949fda --- /dev/null +++ b/roles/Acronis_Clients/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Acronis \ No newline at end of file diff --git a/roles/Acronis_Clients/handlers/main.yml b/roles/Acronis_Clients/handlers/main.yml new file mode 100755 index 0000000..d22295c --- /dev/null +++ b/roles/Acronis_Clients/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Acronis \ No newline at end of file diff --git a/roles/Acronis_Clients/meta/main.yml b/roles/Acronis_Clients/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Acronis_Clients/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Acronis_Clients/tasks/main.yml b/roles/Acronis_Clients/tasks/main.yml new file mode 100755 index 0000000..5eaf83e --- /dev/null +++ b/roles/Acronis_Clients/tasks/main.yml @@ -0,0 +1,5 @@ +--- +# tasks file for Acronis +- name: Install Acronis_client + shell: 'cd /root/Desktop && ./AcronisBackup_12.5_64-bit.x86_64 -a -i BackupAndRecoveryAgent --ams "{{server_acronis}}" --login "{{user_acronis}}" --password "{{password_acronis}}"' + diff --git a/roles/Acronis_Clients/tests/inventory b/roles/Acronis_Clients/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Acronis_Clients/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Acronis_Clients/tests/test.yml b/roles/Acronis_Clients/tests/test.yml new file mode 100755 index 0000000..d92b529 --- /dev/null +++ b/roles/Acronis_Clients/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Acronis \ No newline at end of file diff --git a/roles/Acronis_Clients/vars/main.yml b/roles/Acronis_Clients/vars/main.yml new file mode 100755 index 0000000..32ad2a7 --- /dev/null +++ b/roles/Acronis_Clients/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Acronis \ No newline at end of file diff --git a/roles/Acronis_Clients/varsÂsain.yml b/roles/Acronis_Clients/varsÂsain.yml new file mode 100755 index 0000000..7432e22 --- /dev/null +++ b/roles/Acronis_Clients/varsÂsain.yml @@ -0,0 +1,4 @@ +--- +server_acronis: 172.17.22.175 +user_acronis: root +password_acronis: gmv2gmv diff --git a/roles/Acronis_Server/.travis.yml b/roles/Acronis_Server/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Acronis_Server/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Acronis_Server/README.md b/roles/Acronis_Server/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Acronis_Server/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Acronis_Server/defaults/main.yml b/roles/Acronis_Server/defaults/main.yml new file mode 100755 index 0000000..a949fda --- /dev/null +++ b/roles/Acronis_Server/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Acronis \ No newline at end of file diff --git a/roles/Acronis_Server/handlers/main.yml b/roles/Acronis_Server/handlers/main.yml new file mode 100755 index 0000000..d22295c --- /dev/null +++ b/roles/Acronis_Server/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Acronis \ No newline at end of file diff --git a/roles/Acronis_Server/meta/main.yml b/roles/Acronis_Server/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Acronis_Server/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Acronis_Server/tasks/main.yml b/roles/Acronis_Server/tasks/main.yml new file mode 100755 index 0000000..07ca34b --- /dev/null +++ b/roles/Acronis_Server/tasks/main.yml @@ -0,0 +1,5 @@ +--- +# tasks file for Acronis +- name: Install Acronis + shell: 'cd /root/Desktop && ./AcronisBackup_12.5_64-bit.x86_64 --id=AcronisCentralizedManagementServer --web-server-port=9887 --ams-tcp-port=7780 -a' + diff --git a/roles/Acronis_Server/tests/inventory b/roles/Acronis_Server/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Acronis_Server/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Acronis_Server/tests/test.yml b/roles/Acronis_Server/tests/test.yml new file mode 100755 index 0000000..d92b529 --- /dev/null +++ b/roles/Acronis_Server/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Acronis \ No newline at end of file diff --git a/roles/Acronis_Server/vars/main.yml b/roles/Acronis_Server/vars/main.yml new file mode 100755 index 0000000..32ad2a7 --- /dev/null +++ b/roles/Acronis_Server/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Acronis \ No newline at end of file diff --git a/roles/Afick_Install/.travis.yml b/roles/Afick_Install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Afick_Install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Afick_Install/README.md b/roles/Afick_Install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Afick_Install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Afick_Install/defaults/main.yml b/roles/Afick_Install/defaults/main.yml new file mode 100755 index 0000000..d93d757 --- /dev/null +++ b/roles/Afick_Install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Afick_Install \ No newline at end of file diff --git a/roles/Afick_Install/handlers/main.yml b/roles/Afick_Install/handlers/main.yml new file mode 100755 index 0000000..e5232dd --- /dev/null +++ b/roles/Afick_Install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Afick_Install \ No newline at end of file diff --git a/roles/Afick_Install/meta/main.yml b/roles/Afick_Install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Afick_Install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Afick_Install/tasks/main.yml b/roles/Afick_Install/tasks/main.yml new file mode 100755 index 0000000..47af35c --- /dev/null +++ b/roles/Afick_Install/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for Afick_Install +- name: Install afick + yum: + name: Afick + state: present +- name: Install Perl + yum: + name: perl + state: present +- name: Install Perl Digest + yum: + name: perl-Digest-MD5 + state: present +- name: Check correct install Afick + command: afick -V diff --git a/roles/Afick_Install/tests/inventory b/roles/Afick_Install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Afick_Install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Afick_Install/tests/test.yml b/roles/Afick_Install/tests/test.yml new file mode 100755 index 0000000..6be2b7d --- /dev/null +++ b/roles/Afick_Install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Afick_Install \ No newline at end of file diff --git a/roles/Afick_Install/vars/main.yml b/roles/Afick_Install/vars/main.yml new file mode 100755 index 0000000..05aac65 --- /dev/null +++ b/roles/Afick_Install/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Afick_Install \ No newline at end of file diff --git a/roles/Apache_Install/.travis.yml b/roles/Apache_Install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Apache_Install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Apache_Install/README.md b/roles/Apache_Install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Apache_Install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Apache_Install/defaults/main.yml b/roles/Apache_Install/defaults/main.yml new file mode 100755 index 0000000..d93d757 --- /dev/null +++ b/roles/Apache_Install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Afick_Install \ No newline at end of file diff --git a/roles/Apache_Install/handlers/main.yml b/roles/Apache_Install/handlers/main.yml new file mode 100755 index 0000000..e5232dd --- /dev/null +++ b/roles/Apache_Install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Afick_Install \ No newline at end of file diff --git a/roles/Apache_Install/meta/main.yml b/roles/Apache_Install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Apache_Install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Apache_Install/tasks/main.yml b/roles/Apache_Install/tasks/main.yml new file mode 100755 index 0000000..839618d --- /dev/null +++ b/roles/Apache_Install/tasks/main.yml @@ -0,0 +1,10 @@ +--- +# tasks file for Apache_Install +- name: Install Httpd + yum: + name: httpd + state: present +- name: Start Httpd + systemd: + state: started + name: httpd diff --git a/roles/Apache_Install/tests/inventory b/roles/Apache_Install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Apache_Install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Apache_Install/tests/test.yml b/roles/Apache_Install/tests/test.yml new file mode 100755 index 0000000..6be2b7d --- /dev/null +++ b/roles/Apache_Install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Afick_Install \ No newline at end of file diff --git a/roles/Apache_Install/vars/main.yml b/roles/Apache_Install/vars/main.yml new file mode 100755 index 0000000..05aac65 --- /dev/null +++ b/roles/Apache_Install/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Afick_Install \ No newline at end of file diff --git a/roles/Asterix_Install/.travis.yml b/roles/Asterix_Install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Asterix_Install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Asterix_Install/README.md b/roles/Asterix_Install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Asterix_Install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Asterix_Install/defaults/main.yml b/roles/Asterix_Install/defaults/main.yml new file mode 100755 index 0000000..83b99c0 --- /dev/null +++ b/roles/Asterix_Install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for NFS-Server \ No newline at end of file diff --git a/roles/Asterix_Install/files/media.repo b/roles/Asterix_Install/files/media.repo new file mode 100755 index 0000000..646434b --- /dev/null +++ b/roles/Asterix_Install/files/media.repo @@ -0,0 +1,9 @@ +[RHEL7.7] +name=Red Hat Enterprise Linux 7.7 +mediaid=1563892373.442998 +metadata_expire=-1 +gpgcheck=1 +cost=500 +enabled=1 +baseurl=file:///repo/ +gpgkey=fille:///etc/pki/rpm-gpg/RPM-GPGKEY-redhat-release diff --git a/roles/Asterix_Install/handlers/main.yml b/roles/Asterix_Install/handlers/main.yml new file mode 100755 index 0000000..b49287b --- /dev/null +++ b/roles/Asterix_Install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for NFS-Server \ No newline at end of file diff --git a/roles/Asterix_Install/meta/main.yml b/roles/Asterix_Install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Asterix_Install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Asterix_Install/tasks/main.yml b/roles/Asterix_Install/tasks/main.yml new file mode 100755 index 0000000..3f28e31 --- /dev/null +++ b/roles/Asterix_Install/tasks/main.yml @@ -0,0 +1,65 @@ +--- +# tasks file for Asterix_Install +- name: Change selinux + shell: sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config && setenforce 0 +- name: Install Dependencies + yum: + name: + - epel-release + - dmidecode + - gcc-c++ + - ncurses-devel + - libxml2-devel + - make + - wget + - openssl-devel + - newt-devel + - kernel-devel + - sqlite-devel + - libuuid-devel + - gtk2-devel + - jansson-devel + - binutils-devel + - libedit + - libedit-devel + state: present +- name: Copy Libraries and Asterix + copy: + src: files/*.tar* + dest: /opt +- name: Create directory to copy Asterix + shell: "mkdir /opt/asterix" +- name: Extract Asterix + unarchive: + src: /opt/asterisk-16-current.tar.gz + dest: /opt/asterix +- name: Extract Dependencies + unarchive: + src: /opt/pjproject-2.9.tar + dest: /opt/asterix +- name: Install Library for asterix + make: + chdir: /opt/pjproject-2.9 + target: configure + params: + CFLAGS: "-DNDEBUG -DPJ_HAS_IPV6=1" + prefix: /usr + libdir: /usr/lib64 + enable-shared: + disable-video: + disable-sound: + disable-opencore-amr: +- name: Install Asterix + make: + chdir: /opt/asterisk-16.9.0 + target: configure + params: + libdir: /usr/lib64 + with-jansson-bundled: +- name: Config FW + firewalld: + port: 5060 + permanent: yes + state: enabled +- name: Firewall reload + shell: firewall-cmd --reload \ No newline at end of file diff --git a/roles/Asterix_Install/tests/inventory b/roles/Asterix_Install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Asterix_Install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Asterix_Install/tests/test.yml b/roles/Asterix_Install/tests/test.yml new file mode 100755 index 0000000..b7e6fa6 --- /dev/null +++ b/roles/Asterix_Install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - NFS-Server \ No newline at end of file diff --git a/roles/Asterix_Install/vars/main.yml b/roles/Asterix_Install/vars/main.yml new file mode 100755 index 0000000..f8c1ad8 --- /dev/null +++ b/roles/Asterix_Install/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for NFS-Server \ No newline at end of file diff --git a/roles/Configure_Hostname/.travis.yml b/roles/Configure_Hostname/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Configure_Hostname/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Configure_Hostname/README.md b/roles/Configure_Hostname/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Configure_Hostname/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Configure_Hostname/defaults/main.yml b/roles/Configure_Hostname/defaults/main.yml new file mode 100755 index 0000000..89f369b --- /dev/null +++ b/roles/Configure_Hostname/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Configure_Hostname \ No newline at end of file diff --git a/roles/Configure_Hostname/handlers/main.yml b/roles/Configure_Hostname/handlers/main.yml new file mode 100755 index 0000000..58eeafe --- /dev/null +++ b/roles/Configure_Hostname/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Configure_Hostname \ No newline at end of file diff --git a/roles/Configure_Hostname/meta/main.yml b/roles/Configure_Hostname/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Configure_Hostname/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Configure_Hostname/tasks/main.yml b/roles/Configure_Hostname/tasks/main.yml new file mode 100755 index 0000000..fbe20c0 --- /dev/null +++ b/roles/Configure_Hostname/tasks/main.yml @@ -0,0 +1,15 @@ +--- +# tasks file for Configure_Hostname +- name: Configure Hostname + shell: hostnamectl set-hostname "{{hostname_suffix}}"."{{suffix}}" +- name: Insert Hosts + blockinfile: + path: /etc/hosts + block: | + 172.17.22.174 gsmc5.gsmc.com +- name: Insert resolv + replace: + path: /etc/resolv.conf + regexp: '^gmv.es' + replace: 'gsmc.com' + diff --git a/roles/Configure_Hostname/tests/inventory b/roles/Configure_Hostname/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Configure_Hostname/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Configure_Hostname/tests/test.yml b/roles/Configure_Hostname/tests/test.yml new file mode 100755 index 0000000..0b6d4c2 --- /dev/null +++ b/roles/Configure_Hostname/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Configure_Hostname \ No newline at end of file diff --git a/roles/Configure_Hostname/vars/main.yml b/roles/Configure_Hostname/vars/main.yml new file mode 100755 index 0000000..ff8a270 --- /dev/null +++ b/roles/Configure_Hostname/vars/main.yml @@ -0,0 +1,3 @@ +--- +# vars file for Configure_Hostname +suffix: gsmc.com diff --git a/roles/Git_Repo/README.md b/roles/Git_Repo/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Git_Repo/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Git_Repo/defaults/main.yml b/roles/Git_Repo/defaults/main.yml new file mode 100755 index 0000000..27d9f48 --- /dev/null +++ b/roles/Git_Repo/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for NFS_mount \ No newline at end of file diff --git a/roles/Git_Repo/files/media.repo b/roles/Git_Repo/files/media.repo new file mode 100755 index 0000000..f499601 --- /dev/null +++ b/roles/Git_Repo/files/media.repo @@ -0,0 +1,9 @@ +[RHEL7.7] +name=DVD for Red Hat Enterprise Linux 7.7 Server +mediaid=1359576196.686790 +metadata_expire=-1 +gpgcheck=1 +cost=500 +enabled=1 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/Git_Repo/files/redhat.repo b/roles/Git_Repo/files/redhat.repo new file mode 100755 index 0000000..479f04a --- /dev/null +++ b/roles/Git_Repo/files/redhat.repo @@ -0,0 +1,8 @@ +[InstallMedia] +name=Red Hat Enterprise Linux 7.7 +mediaid=1563892373.442998 +metadata_expire=-1 +gpgcheck=0 +cost=500 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/Git_Repo/handlers/main.yml b/roles/Git_Repo/handlers/main.yml new file mode 100755 index 0000000..8d94eb4 --- /dev/null +++ b/roles/Git_Repo/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for NFS_mount \ No newline at end of file diff --git a/roles/Git_Repo/meta/main.yml b/roles/Git_Repo/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Git_Repo/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Git_Repo/tasks/main.yml b/roles/Git_Repo/tasks/main.yml new file mode 100755 index 0000000..3bea77a --- /dev/null +++ b/roles/Git_Repo/tasks/main.yml @@ -0,0 +1,7 @@ +--- +# tasks file for Git_Repo +- name: Install GIT + shell: "yum install git" +- name: Init git Repo + shell: 'mkdir /repodata && cd /repodata && git init --bare' + diff --git a/roles/Git_Repo/tests/inventory b/roles/Git_Repo/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Git_Repo/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Git_Repo/tests/test.yml b/roles/Git_Repo/tests/test.yml new file mode 100755 index 0000000..7851260 --- /dev/null +++ b/roles/Git_Repo/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - NFS_mount \ No newline at end of file diff --git a/roles/Git_Repo/vars/main.yml b/roles/Git_Repo/vars/main.yml new file mode 100755 index 0000000..74822a6 --- /dev/null +++ b/roles/Git_Repo/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for NFS_mount \ No newline at end of file diff --git a/roles/Git_client/README.md b/roles/Git_client/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Git_client/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Git_client/defaults/main.yml b/roles/Git_client/defaults/main.yml new file mode 100755 index 0000000..27d9f48 --- /dev/null +++ b/roles/Git_client/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for NFS_mount \ No newline at end of file diff --git a/roles/Git_client/files/media.repo b/roles/Git_client/files/media.repo new file mode 100755 index 0000000..f499601 --- /dev/null +++ b/roles/Git_client/files/media.repo @@ -0,0 +1,9 @@ +[RHEL7.7] +name=DVD for Red Hat Enterprise Linux 7.7 Server +mediaid=1359576196.686790 +metadata_expire=-1 +gpgcheck=1 +cost=500 +enabled=1 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/Git_client/files/redhat.repo b/roles/Git_client/files/redhat.repo new file mode 100755 index 0000000..479f04a --- /dev/null +++ b/roles/Git_client/files/redhat.repo @@ -0,0 +1,8 @@ +[InstallMedia] +name=Red Hat Enterprise Linux 7.7 +mediaid=1563892373.442998 +metadata_expire=-1 +gpgcheck=0 +cost=500 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/Git_client/handlers/main.yml b/roles/Git_client/handlers/main.yml new file mode 100755 index 0000000..8d94eb4 --- /dev/null +++ b/roles/Git_client/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for NFS_mount \ No newline at end of file diff --git a/roles/Git_client/meta/main.yml b/roles/Git_client/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Git_client/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Git_client/tasks/main.yml b/roles/Git_client/tasks/main.yml new file mode 100755 index 0000000..a386b34 --- /dev/null +++ b/roles/Git_client/tasks/main.yml @@ -0,0 +1,8 @@ +--- +# tasks file for Git_client +- name: Install GIT + shell: "yum install git" +- name: Init git Repo + shell: 'mkdir /repodata && git clone [[Server_IP]]:/repodata /repodata' + + diff --git a/roles/Git_client/tests/inventory b/roles/Git_client/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Git_client/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Git_client/tests/test.yml b/roles/Git_client/tests/test.yml new file mode 100755 index 0000000..7851260 --- /dev/null +++ b/roles/Git_client/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - NFS_mount \ No newline at end of file diff --git a/roles/Git_client/vars/main.yml b/roles/Git_client/vars/main.yml new file mode 100755 index 0000000..74822a6 --- /dev/null +++ b/roles/Git_client/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for NFS_mount \ No newline at end of file diff --git a/roles/IPA_clients_install/.travis.yml b/roles/IPA_clients_install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/IPA_clients_install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/IPA_clients_install/README.md b/roles/IPA_clients_install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/IPA_clients_install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/IPA_clients_install/defaults/main.yml b/roles/IPA_clients_install/defaults/main.yml new file mode 100755 index 0000000..4f89ff2 --- /dev/null +++ b/roles/IPA_clients_install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for LDAP_create \ No newline at end of file diff --git a/roles/IPA_clients_install/files/lista_de_usuarios_ldap b/roles/IPA_clients_install/files/lista_de_usuarios_ldap new file mode 100755 index 0000000..6809a55 --- /dev/null +++ b/roles/IPA_clients_install/files/lista_de_usuarios_ldap @@ -0,0 +1,2 @@ + admin + gsmc diff --git a/roles/IPA_clients_install/files/user_1 b/roles/IPA_clients_install/files/user_1 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_1 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_10 b/roles/IPA_clients_install/files/user_10 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_10 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_11 b/roles/IPA_clients_install/files/user_11 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_11 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_12 b/roles/IPA_clients_install/files/user_12 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_12 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_13 b/roles/IPA_clients_install/files/user_13 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_13 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_14 b/roles/IPA_clients_install/files/user_14 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_14 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_15 b/roles/IPA_clients_install/files/user_15 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_15 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_2 b/roles/IPA_clients_install/files/user_2 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_2 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_3 b/roles/IPA_clients_install/files/user_3 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_3 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_4 b/roles/IPA_clients_install/files/user_4 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_4 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_5 b/roles/IPA_clients_install/files/user_5 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_5 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_6 b/roles/IPA_clients_install/files/user_6 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_6 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_7 b/roles/IPA_clients_install/files/user_7 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_7 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_8 b/roles/IPA_clients_install/files/user_8 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_8 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/user_9 b/roles/IPA_clients_install/files/user_9 new file mode 100755 index 0000000..83b9943 --- /dev/null +++ b/roles/IPA_clients_install/files/user_9 @@ -0,0 +1,3 @@ + admin +d + gsmc diff --git a/roles/IPA_clients_install/files/view_users_ldap b/roles/IPA_clients_install/files/view_users_ldap new file mode 100755 index 0000000..710a57c --- /dev/null +++ b/roles/IPA_clients_install/files/view_users_ldap @@ -0,0 +1,4 @@ +ipa user-find | egrep "User login:" | cut -d: -f2 > lista_de_usuarios_ldap +users=$(cat lista_de_usuarios_ldap) +echo $users + diff --git a/roles/IPA_clients_install/handlers/main.yml b/roles/IPA_clients_install/handlers/main.yml new file mode 100755 index 0000000..11f851a --- /dev/null +++ b/roles/IPA_clients_install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for LDAP_create \ No newline at end of file diff --git a/roles/IPA_clients_install/meta/main.yml b/roles/IPA_clients_install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/IPA_clients_install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/IPA_clients_install/tasks/main.yml b/roles/IPA_clients_install/tasks/main.yml new file mode 100755 index 0000000..95fbda1 --- /dev/null +++ b/roles/IPA_clients_install/tasks/main.yml @@ -0,0 +1,7 @@ +--- +- name: Install IPA Client + yum: + name: ipa-client + state: present +- name: IPA client command to join + shell: ipa-client-install --domain=gsmc.com --server=gsmc5.gsmc.com --password=Gmv2Gmv* -padmin -U --mkhomedir diff --git a/roles/IPA_clients_install/tests/inventory b/roles/IPA_clients_install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/IPA_clients_install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/IPA_clients_install/tests/test.yml b/roles/IPA_clients_install/tests/test.yml new file mode 100755 index 0000000..84f1286 --- /dev/null +++ b/roles/IPA_clients_install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - LDAP_create \ No newline at end of file diff --git a/roles/IPA_clients_install/vars/main.yml b/roles/IPA_clients_install/vars/main.yml new file mode 100755 index 0000000..ae03a02 --- /dev/null +++ b/roles/IPA_clients_install/vars/main.yml @@ -0,0 +1,3 @@ +user: admin +user: gsmc + diff --git a/roles/IPA_clients_install/vars/user_list b/roles/IPA_clients_install/vars/user_list new file mode 100755 index 0000000..e26f86b --- /dev/null +++ b/roles/IPA_clients_install/vars/user_list @@ -0,0 +1,2 @@ +user: admin +user: gsmc diff --git a/roles/IPA_server_install/.travis.yml b/roles/IPA_server_install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/IPA_server_install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/IPA_server_install/README.md b/roles/IPA_server_install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/IPA_server_install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/IPA_server_install/defaults/main.yml b/roles/IPA_server_install/defaults/main.yml new file mode 100755 index 0000000..2eec251 --- /dev/null +++ b/roles/IPA_server_install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for IPA_server_install \ No newline at end of file diff --git a/roles/IPA_server_install/handlers/main.yml b/roles/IPA_server_install/handlers/main.yml new file mode 100755 index 0000000..5b01c4d --- /dev/null +++ b/roles/IPA_server_install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for IPA_server_install \ No newline at end of file diff --git a/roles/IPA_server_install/meta/main.yml b/roles/IPA_server_install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/IPA_server_install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/IPA_server_install/tasks/main.yml b/roles/IPA_server_install/tasks/main.yml new file mode 100755 index 0000000..29762cf --- /dev/null +++ b/roles/IPA_server_install/tasks/main.yml @@ -0,0 +1,27 @@ +--- +# tasks file for IPA_server_install +- name: Install IPA_server + yum: + name: + - ipa-server-dns + - ipa-server + state: present +- name: Configure IPA_Server + shell: ipa-server-install -a "{{password}}" --hostname="{{hostname}}" -r "{{realm}}" -p "{{password}}" -n "{{domain}}" -U +- name: Config Firewall + firewalld: + port: "{{ item }}" + permanent: yes + state: enabled + loop: + - 80/tcp + - 88/tcp + - 389/tcp + - 464/tcp + - 88/udp + - 464/udp + - 123/udp +- name: Firewall reload + shell: firewall-cmd --reload + + diff --git a/roles/IPA_server_install/tests/inventory b/roles/IPA_server_install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/IPA_server_install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/IPA_server_install/tests/test.yml b/roles/IPA_server_install/tests/test.yml new file mode 100755 index 0000000..333cf41 --- /dev/null +++ b/roles/IPA_server_install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - IPA_server_install \ No newline at end of file diff --git a/roles/IPA_server_install/vars/main.yml b/roles/IPA_server_install/vars/main.yml new file mode 100755 index 0000000..909bf81 --- /dev/null +++ b/roles/IPA_server_install/vars/main.yml @@ -0,0 +1,6 @@ +--- +# vars file for IPA_server_install +password: Gmv2Gmv* +realm: GSMC.COM +domain: gsmc.com + diff --git a/roles/Mount_BBDD/.travis.yml b/roles/Mount_BBDD/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Mount_BBDD/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Mount_BBDD/README.md b/roles/Mount_BBDD/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Mount_BBDD/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Mount_BBDD/defaults/main.yml b/roles/Mount_BBDD/defaults/main.yml new file mode 100755 index 0000000..89258bb --- /dev/null +++ b/roles/Mount_BBDD/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Mount_BBDD \ No newline at end of file diff --git a/roles/Mount_BBDD/handlers/main.yml b/roles/Mount_BBDD/handlers/main.yml new file mode 100755 index 0000000..16e03f0 --- /dev/null +++ b/roles/Mount_BBDD/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Mount_BBDD \ No newline at end of file diff --git a/roles/Mount_BBDD/meta/main.yml b/roles/Mount_BBDD/meta/main.yml new file mode 100755 index 0000000..3a212a9 --- /dev/null +++ b/roles/Mount_BBDD/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.4 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Mount_BBDD/tasks/main.yml b/roles/Mount_BBDD/tasks/main.yml new file mode 100755 index 0000000..054a698 --- /dev/null +++ b/roles/Mount_BBDD/tasks/main.yml @@ -0,0 +1,9 @@ +--- +# tasks file for Mount_BBDD +- name: Mount up device by UUID + mount: + path: /BBDD + src: UUID=b3e48f45-f933-4c8e-a700-22a159ec9077 + fstype: ext4 + opts: noatime + state: present \ No newline at end of file diff --git a/roles/Mount_BBDD/tests/inventory b/roles/Mount_BBDD/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Mount_BBDD/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Mount_BBDD/tests/test.yml b/roles/Mount_BBDD/tests/test.yml new file mode 100755 index 0000000..828e36c --- /dev/null +++ b/roles/Mount_BBDD/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Mount_BBDD \ No newline at end of file diff --git a/roles/Mount_BBDD/vars/main.yml b/roles/Mount_BBDD/vars/main.yml new file mode 100755 index 0000000..8f5a095 --- /dev/null +++ b/roles/Mount_BBDD/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Mount_BBDD \ No newline at end of file diff --git a/roles/NFS-Server/.travis.yml b/roles/NFS-Server/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/NFS-Server/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/NFS-Server/README.md b/roles/NFS-Server/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/NFS-Server/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/NFS-Server/defaults/main.yml b/roles/NFS-Server/defaults/main.yml new file mode 100755 index 0000000..83b99c0 --- /dev/null +++ b/roles/NFS-Server/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for NFS-Server \ No newline at end of file diff --git a/roles/NFS-Server/files/media.repo b/roles/NFS-Server/files/media.repo new file mode 100755 index 0000000..646434b --- /dev/null +++ b/roles/NFS-Server/files/media.repo @@ -0,0 +1,9 @@ +[RHEL7.7] +name=Red Hat Enterprise Linux 7.7 +mediaid=1563892373.442998 +metadata_expire=-1 +gpgcheck=1 +cost=500 +enabled=1 +baseurl=file:///repo/ +gpgkey=fille:///etc/pki/rpm-gpg/RPM-GPGKEY-redhat-release diff --git a/roles/NFS-Server/handlers/main.yml b/roles/NFS-Server/handlers/main.yml new file mode 100755 index 0000000..b49287b --- /dev/null +++ b/roles/NFS-Server/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for NFS-Server \ No newline at end of file diff --git a/roles/NFS-Server/meta/main.yml b/roles/NFS-Server/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/NFS-Server/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/NFS-Server/tasks/main.yml b/roles/NFS-Server/tasks/main.yml new file mode 100755 index 0000000..de97a2d --- /dev/null +++ b/roles/NFS-Server/tasks/main.yml @@ -0,0 +1,22 @@ +--- +# tasks file for NFS-Server +- name: NFS-Server start process + systemd: + state: started + name: nfs-server +- name: Create Repo + blockinfile: + path: /etc/exports + block: | + /repo * (rw,sync,no_subtree_check) +- name: Delete old Repos + shell: 'rm -rf /etc/yum.repos.d/*' +- name: Copy Media.repo + copy: + src: files/media.repo + dest: /etc/yum.repos.d/ +- name: Clean all old repos and packages + shell: 'yum clean all' +- name: Update Repo + shell: 'yum makecache fast' + diff --git a/roles/NFS-Server/tests/inventory b/roles/NFS-Server/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/NFS-Server/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/NFS-Server/tests/test.yml b/roles/NFS-Server/tests/test.yml new file mode 100755 index 0000000..b7e6fa6 --- /dev/null +++ b/roles/NFS-Server/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - NFS-Server \ No newline at end of file diff --git a/roles/NFS-Server/vars/main.yml b/roles/NFS-Server/vars/main.yml new file mode 100755 index 0000000..f8c1ad8 --- /dev/null +++ b/roles/NFS-Server/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for NFS-Server \ No newline at end of file diff --git a/roles/NFS_mount/.travis.yml b/roles/NFS_mount/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/NFS_mount/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/NFS_mount/README.md b/roles/NFS_mount/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/NFS_mount/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/NFS_mount/defaults/main.yml b/roles/NFS_mount/defaults/main.yml new file mode 100755 index 0000000..27d9f48 --- /dev/null +++ b/roles/NFS_mount/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for NFS_mount \ No newline at end of file diff --git a/roles/NFS_mount/files/media.repo b/roles/NFS_mount/files/media.repo new file mode 100755 index 0000000..f499601 --- /dev/null +++ b/roles/NFS_mount/files/media.repo @@ -0,0 +1,9 @@ +[RHEL7.7] +name=DVD for Red Hat Enterprise Linux 7.7 Server +mediaid=1359576196.686790 +metadata_expire=-1 +gpgcheck=1 +cost=500 +enabled=1 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/NFS_mount/files/redhat.repo b/roles/NFS_mount/files/redhat.repo new file mode 100755 index 0000000..479f04a --- /dev/null +++ b/roles/NFS_mount/files/redhat.repo @@ -0,0 +1,8 @@ +[InstallMedia] +name=Red Hat Enterprise Linux 7.7 +mediaid=1563892373.442998 +metadata_expire=-1 +gpgcheck=0 +cost=500 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/NFS_mount/handlers/main.yml b/roles/NFS_mount/handlers/main.yml new file mode 100755 index 0000000..8d94eb4 --- /dev/null +++ b/roles/NFS_mount/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for NFS_mount \ No newline at end of file diff --git a/roles/NFS_mount/meta/main.yml b/roles/NFS_mount/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/NFS_mount/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/NFS_mount/tasks/main.yml b/roles/NFS_mount/tasks/main.yml new file mode 100755 index 0000000..d3bf62b --- /dev/null +++ b/roles/NFS_mount/tasks/main.yml @@ -0,0 +1,24 @@ +--- +# tasks file for NFS_mount +- name: NFS insert in FStab + blockinfile: + path: /etc/fstab + block: | + 35.54.20.230:/repo /repo nfs +- name: Mount NFS + shell: 'mount -a' +- name: Delete all repos deprecated or not working + shell: 'rm -rf /etc/yum.repos.d/*' +- name: Copy Media.repo + copy: + src: files/redhat.repo + dest: /etc/yum.repos.d/ +- name: Clean cache of old's repos + shell: 'yum clean all' +- name: Update repos cache + shell: 'yum makecache fast' +- name: install the latest version of wget + yum: + name: wget + state: latest + diff --git a/roles/NFS_mount/tests/inventory b/roles/NFS_mount/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/NFS_mount/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/NFS_mount/tests/test.yml b/roles/NFS_mount/tests/test.yml new file mode 100755 index 0000000..7851260 --- /dev/null +++ b/roles/NFS_mount/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - NFS_mount \ No newline at end of file diff --git a/roles/NFS_mount/vars/main.yml b/roles/NFS_mount/vars/main.yml new file mode 100755 index 0000000..74822a6 --- /dev/null +++ b/roles/NFS_mount/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for NFS_mount \ No newline at end of file diff --git a/roles/Nginx_Install/.travis.yml b/roles/Nginx_Install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Nginx_Install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Nginx_Install/README.md b/roles/Nginx_Install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Nginx_Install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Nginx_Install/defaults/main.yml b/roles/Nginx_Install/defaults/main.yml new file mode 100755 index 0000000..d93d757 --- /dev/null +++ b/roles/Nginx_Install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Afick_Install \ No newline at end of file diff --git a/roles/Nginx_Install/handlers/main.yml b/roles/Nginx_Install/handlers/main.yml new file mode 100755 index 0000000..e5232dd --- /dev/null +++ b/roles/Nginx_Install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Afick_Install \ No newline at end of file diff --git a/roles/Nginx_Install/meta/main.yml b/roles/Nginx_Install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Nginx_Install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Nginx_Install/tasks/main.yml b/roles/Nginx_Install/tasks/main.yml new file mode 100755 index 0000000..b2bdd25 --- /dev/null +++ b/roles/Nginx_Install/tasks/main.yml @@ -0,0 +1,10 @@ +--- +# tasks file for nginx_install +- name: Install nginx + yum: + name: nginx + state: present +- name: Start Nginx + systemd: + state: started + name: nginx diff --git a/roles/Nginx_Install/tests/inventory b/roles/Nginx_Install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Nginx_Install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Nginx_Install/tests/test.yml b/roles/Nginx_Install/tests/test.yml new file mode 100755 index 0000000..6be2b7d --- /dev/null +++ b/roles/Nginx_Install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Afick_Install \ No newline at end of file diff --git a/roles/Nginx_Install/vars/main.yml b/roles/Nginx_Install/vars/main.yml new file mode 100755 index 0000000..05aac65 --- /dev/null +++ b/roles/Nginx_Install/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Afick_Install \ No newline at end of file diff --git a/roles/Postfix_Install/.travis.yml b/roles/Postfix_Install/.travis.yml new file mode 100755 index 0000000..36bbf62 --- /dev/null +++ b/roles/Postfix_Install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/Postfix_Install/README.md b/roles/Postfix_Install/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Postfix_Install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Postfix_Install/defaults/main.yml b/roles/Postfix_Install/defaults/main.yml new file mode 100755 index 0000000..d93d757 --- /dev/null +++ b/roles/Postfix_Install/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for Afick_Install \ No newline at end of file diff --git a/roles/Postfix_Install/handlers/main.yml b/roles/Postfix_Install/handlers/main.yml new file mode 100755 index 0000000..e5232dd --- /dev/null +++ b/roles/Postfix_Install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for Afick_Install \ No newline at end of file diff --git a/roles/Postfix_Install/meta/main.yml b/roles/Postfix_Install/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Postfix_Install/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Postfix_Install/tasks/main.yml b/roles/Postfix_Install/tasks/main.yml new file mode 100755 index 0000000..011f182 --- /dev/null +++ b/roles/Postfix_Install/tasks/main.yml @@ -0,0 +1,30 @@ +--- +# tasks file for nginx_install +- name: Remove Sendmail + yum: + name: sendmail + state: remove +- name: Install Postfix + yum: + name: postfix + state: present +- name: Replace Domain + replace: + path: /etc/postfix/main.cf + regexp: '\b(localhost)(\d*)\b' + replace: 'smtp.gsmc.com' +- name: Config Postfix + blockinfile: + path: /etc/postfix/main.cf + block: | + mydomain = gsmc.com + myorigin = gsmc.com + inet_interfaces = all + inet_protocols = all + mydestination = $myhostname, localhost.$mydomain, localhost + mynetworks = 192.168.1.0/24, 127.0.0.0/8 + home_mailbox = Maildir/ +- name: Start Nginx + systemd: + state: started + name: postfix \ No newline at end of file diff --git a/roles/Postfix_Install/tests/inventory b/roles/Postfix_Install/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Postfix_Install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Postfix_Install/tests/test.yml b/roles/Postfix_Install/tests/test.yml new file mode 100755 index 0000000..6be2b7d --- /dev/null +++ b/roles/Postfix_Install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - Afick_Install \ No newline at end of file diff --git a/roles/Postfix_Install/vars/main.yml b/roles/Postfix_Install/vars/main.yml new file mode 100755 index 0000000..05aac65 --- /dev/null +++ b/roles/Postfix_Install/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for Afick_Install \ No newline at end of file diff --git a/roles/Pre_NFS/README.md b/roles/Pre_NFS/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/Pre_NFS/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/Pre_NFS/defaults/main.yml b/roles/Pre_NFS/defaults/main.yml new file mode 100755 index 0000000..27d9f48 --- /dev/null +++ b/roles/Pre_NFS/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for NFS_mount \ No newline at end of file diff --git a/roles/Pre_NFS/files/media.repo b/roles/Pre_NFS/files/media.repo new file mode 100755 index 0000000..f499601 --- /dev/null +++ b/roles/Pre_NFS/files/media.repo @@ -0,0 +1,9 @@ +[RHEL7.7] +name=DVD for Red Hat Enterprise Linux 7.7 Server +mediaid=1359576196.686790 +metadata_expire=-1 +gpgcheck=1 +cost=500 +enabled=1 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/Pre_NFS/files/redhat.repo b/roles/Pre_NFS/files/redhat.repo new file mode 100755 index 0000000..479f04a --- /dev/null +++ b/roles/Pre_NFS/files/redhat.repo @@ -0,0 +1,8 @@ +[InstallMedia] +name=Red Hat Enterprise Linux 7.7 +mediaid=1563892373.442998 +metadata_expire=-1 +gpgcheck=0 +cost=500 +baseurl=file:///repo/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/Pre_NFS/handlers/main.yml b/roles/Pre_NFS/handlers/main.yml new file mode 100755 index 0000000..8d94eb4 --- /dev/null +++ b/roles/Pre_NFS/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for NFS_mount \ No newline at end of file diff --git a/roles/Pre_NFS/meta/main.yml b/roles/Pre_NFS/meta/main.yml new file mode 100755 index 0000000..227ad9c --- /dev/null +++ b/roles/Pre_NFS/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/Pre_NFS/tasks/main.yml b/roles/Pre_NFS/tasks/main.yml new file mode 100755 index 0000000..7366a51 --- /dev/null +++ b/roles/Pre_NFS/tasks/main.yml @@ -0,0 +1,11 @@ +--- +# tasks file for NFS_mount +- name: Copy Repo Directory + copy: + src: /repo/ + dest: /repo/ + force: yes +- name: Install NFS-Utils + shell: "yum install nfs-utils" +- name: Delete all local repo + shell: 'rm -rf /repo/*' diff --git a/roles/Pre_NFS/tests/inventory b/roles/Pre_NFS/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/Pre_NFS/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/Pre_NFS/tests/test.yml b/roles/Pre_NFS/tests/test.yml new file mode 100755 index 0000000..7851260 --- /dev/null +++ b/roles/Pre_NFS/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - NFS_mount \ No newline at end of file diff --git a/roles/Pre_NFS/vars/main.yml b/roles/Pre_NFS/vars/main.yml new file mode 100755 index 0000000..74822a6 --- /dev/null +++ b/roles/Pre_NFS/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for NFS_mount \ No newline at end of file diff --git a/roles/esxi_create/README.md b/roles/esxi_create/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/esxi_create/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/esxi_create/defaults/main.yml b/roles/esxi_create/defaults/main.yml new file mode 100755 index 0000000..f19e701 --- /dev/null +++ b/roles/esxi_create/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for esxi_try \ No newline at end of file diff --git a/roles/esxi_create/handlers/main.yml b/roles/esxi_create/handlers/main.yml new file mode 100755 index 0000000..0b9fc07 --- /dev/null +++ b/roles/esxi_create/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for esxi_try \ No newline at end of file diff --git a/roles/esxi_create/meta/main.yml b/roles/esxi_create/meta/main.yml new file mode 100755 index 0000000..7223799 --- /dev/null +++ b/roles/esxi_create/meta/main.yml @@ -0,0 +1,57 @@ +galaxy_info: + author: your name + description: your description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + + min_ansible_version: 1.2 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # Optionally specify the branch Galaxy will use when accessing the GitHub + # repo for this role. During role install, if no tags are available, + # Galaxy will use this branch. During import Galaxy will access files on + # this branch. If Travis integration is configured, only notifications for this + # branch will be accepted. Otherwise, in all cases, the repo's default branch + # (usually master) will be used. + #github_branch: + + # + # platforms is a list of platforms, and each platform has a name and a list of versions. + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. \ No newline at end of file diff --git a/roles/esxi_create/tasks/main.yml b/roles/esxi_create/tasks/main.yml new file mode 100755 index 0000000..1858c8b --- /dev/null +++ b/roles/esxi_create/tasks/main.yml @@ -0,0 +1,144 @@ +- name: Configure POCP_APPSVR01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_APPSVR01 + datacenter: "Datacenter" + template: POCP_APPSVR01_Template + folder: POCP_VMs/ + cluster: "{{ cluster_name }}" + networks: + - name: VM_GSMC_RED35 + start_connected: true + disk: + - size_gb: "{{ disk_size_gsmc1 }}" + type: thin + datastore: '{{ vsphere_datastore }}' + hardware: + memory_mb: '{{ guest_memory_gsmc1 }}' + num_cpus: '{{ guest_vcpu_gsmc1 }}' + state: poweredon + delegate_to: localhost +- name: Configure POCP_DB01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_DB01 + datacenter: "Datacenter" + template: POCP_DB01_Template + folder: POCP_VMs/ + cluster: "{{ cluster_name }}" + force: yes + networks: + - name: VM_GSMC_RED35 + start_connected: true + disk: + - size_gb: "{{ disk_size_gsmc1 }}" + type: thin + datastore: '{{ vsphere_datastore }}' + hardware: + memory_mb: '{{ guest_memory_gsmc1 }}' + num_cpus: '{{ guest_vcpu_gsmc1 }}' + state: poweredon + delegate_to: localhost +- name: Configure POCP_DC01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_DC01 + datacenter: "Datacenter" + template: POCP_DC01_Template + folder: POCP_VMs/ + cluster: "{{ cluster_name }}" + force: yes + networks: + - name: VM_GSMC_RED35 + start_connected: true + disk: + - size_gb: "{{ disk_size_gsmc1 }}" + type: thin + datastore: '{{ vsphere_datastore }}' + hardware: + memory_mb: '{{ guest_memory_gsmc1 }}' + num_cpus: '{{ guest_vcpu_gsmc1 }}' + state: poweredon + delegate_to: localhost +- name: Configure POCP_RootCA + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_RootCA + datacenter: "Datacenter" + template: POCP_RootCA_Template + folder: POCP_VMs/ + cluster: "{{ cluster_name }}" + force: yes + networks: + - name: VM_GSMC_RED35 + start_connected: true + disk: + - size_gb: "{{ disk_size_gsmc1 }}" + type: thin + datastore: '{{ vsphere_datastore }}' + hardware: + memory_mb: '{{ guest_memory_gsmc1 }}' + num_cpus: '{{ guest_vcpu_gsmc1 }}' + state: poweredon + delegate_to: localhost +- name: Configure POCP_SG01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_SG01 + datacenter: "Datacenter" + template: POCP_SG01_Template + folder: POCP_VMs/ + cluster: "{{ cluster_name }}" + force: yes + networks: + - name: VM_GSMC_RED35 + start_connected: true + disk: + - size_gb: "{{ disk_size_gsmc1 }}" + type: thin + datastore: '{{ vsphere_datastore }}' + hardware: + memory_mb: '{{ guest_memory_gsmc1 }}' + num_cpus: '{{ guest_vcpu_gsmc1 }}' + state: poweredon + delegate_to: localhost +- name: Configure POCP_SUPPSVR01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_SUPPSVR01 + datacenter: "Datacenter" + template: POCP_SUPPSVR01_Template + folder: POCP_VMs/ + cluster: "{{ cluster_name }}" + force: yes + networks: + - name: VM_GSMC_RED35 + start_connected: true + disk: + - size_gb: "{{ disk_size_gsmc1 }}" + type: thin + datastore: '{{ vsphere_datastore }}' + hardware: + memory_mb: '{{ guest_memory_gsmc1 }}' + num_cpus: '{{ guest_vcpu_gsmc1 }}' + state: poweredon + delegate_to: localhost + diff --git a/roles/esxi_create/tests/inventory b/roles/esxi_create/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/esxi_create/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/esxi_create/tests/test.yml b/roles/esxi_create/tests/test.yml new file mode 100755 index 0000000..6618761 --- /dev/null +++ b/roles/esxi_create/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - esxi_try \ No newline at end of file diff --git a/roles/esxi_create/vars/main.yml b/roles/esxi_create/vars/main.yml new file mode 100755 index 0000000..606eb2e --- /dev/null +++ b/roles/esxi_create/vars/main.yml @@ -0,0 +1,15 @@ +--- +# vars file for Deploy_Vms +vcenter_server: "192.168.110.10" +vcenter_user: "administrator@gsmcs.local" +vcenter_pass: "GsmcGmv2Gmv*" +datacenter_name: "Datacenter" +folder_datacenter: "POCP_Prueba" +template_srv01: "POCP_APPSVR01" +template: "RHEL_Ansible_DHCP" +cluster_name: "GSMCSCluster" +net_name: "VM_GSMC_RED35" +guest_vcpu_gsmc1: "8" +guest_memory_gsmc1: "8000" +disk_size_gsmc1: "150" +vsphere_datastore: "Cabina-VM" diff --git a/roles/esxi_delete/README.md b/roles/esxi_delete/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/esxi_delete/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/esxi_delete/defaults/main.yml b/roles/esxi_delete/defaults/main.yml new file mode 100755 index 0000000..9920fc5 --- /dev/null +++ b/roles/esxi_delete/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for esxi_delete \ No newline at end of file diff --git a/roles/esxi_delete/handlers/main.yml b/roles/esxi_delete/handlers/main.yml new file mode 100755 index 0000000..da16fe4 --- /dev/null +++ b/roles/esxi_delete/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for esxi_delete \ No newline at end of file diff --git a/roles/esxi_delete/meta/main.yml b/roles/esxi_delete/meta/main.yml new file mode 100755 index 0000000..3a212a9 --- /dev/null +++ b/roles/esxi_delete/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.4 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/roles/esxi_delete/tasks/main.yml b/roles/esxi_delete/tasks/main.yml new file mode 100755 index 0000000..86df1a2 --- /dev/null +++ b/roles/esxi_delete/tasks/main.yml @@ -0,0 +1,67 @@ +- name: Delete VM POCP_APPSVR01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_APPSVR01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: absent + delegate_to: localhost +- name: Delete VM POCP_DB01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_DB01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: absent + delegate_to: localhost +- name: Delete VM POCP_DC01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_DC01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: absent + delegate_to: localhost +- name: Delete VM POCP_RootCA + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_RootCA + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: absent + delegate_to: localhost +- name: Delete VM POCP_SG01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_SG01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: absent + delegate_to: localhost +- name: Delete VM POCP_SUPPSVR01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_SUPPSVR01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: absent + delegate_to: localhost + diff --git a/roles/esxi_delete/tests/inventory b/roles/esxi_delete/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/esxi_delete/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/esxi_delete/tests/test.yml b/roles/esxi_delete/tests/test.yml new file mode 100755 index 0000000..cc8d5d2 --- /dev/null +++ b/roles/esxi_delete/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - esxi_delete \ No newline at end of file diff --git a/roles/esxi_delete/vars/main.yml b/roles/esxi_delete/vars/main.yml new file mode 100755 index 0000000..606eb2e --- /dev/null +++ b/roles/esxi_delete/vars/main.yml @@ -0,0 +1,15 @@ +--- +# vars file for Deploy_Vms +vcenter_server: "192.168.110.10" +vcenter_user: "administrator@gsmcs.local" +vcenter_pass: "GsmcGmv2Gmv*" +datacenter_name: "Datacenter" +folder_datacenter: "POCP_Prueba" +template_srv01: "POCP_APPSVR01" +template: "RHEL_Ansible_DHCP" +cluster_name: "GSMCSCluster" +net_name: "VM_GSMC_RED35" +guest_vcpu_gsmc1: "8" +guest_memory_gsmc1: "8000" +disk_size_gsmc1: "150" +vsphere_datastore: "Cabina-VM" diff --git a/roles/esxi_stop/README.md b/roles/esxi_stop/README.md new file mode 100755 index 0000000..225dd44 --- /dev/null +++ b/roles/esxi_stop/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/esxi_stop/defaults/main.yml b/roles/esxi_stop/defaults/main.yml new file mode 100755 index 0000000..f19e701 --- /dev/null +++ b/roles/esxi_stop/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for esxi_try \ No newline at end of file diff --git a/roles/esxi_stop/handlers/main.yml b/roles/esxi_stop/handlers/main.yml new file mode 100755 index 0000000..0b9fc07 --- /dev/null +++ b/roles/esxi_stop/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for esxi_try \ No newline at end of file diff --git a/roles/esxi_stop/meta/main.yml b/roles/esxi_stop/meta/main.yml new file mode 100755 index 0000000..7223799 --- /dev/null +++ b/roles/esxi_stop/meta/main.yml @@ -0,0 +1,57 @@ +galaxy_info: + author: your name + description: your description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + + min_ansible_version: 1.2 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # Optionally specify the branch Galaxy will use when accessing the GitHub + # repo for this role. During role install, if no tags are available, + # Galaxy will use this branch. During import Galaxy will access files on + # this branch. If Travis integration is configured, only notifications for this + # branch will be accepted. Otherwise, in all cases, the repo's default branch + # (usually master) will be used. + #github_branch: + + # + # platforms is a list of platforms, and each platform has a name and a list of versions. + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. \ No newline at end of file diff --git a/roles/esxi_stop/tasks/main.yml b/roles/esxi_stop/tasks/main.yml new file mode 100755 index 0000000..94ab23b --- /dev/null +++ b/roles/esxi_stop/tasks/main.yml @@ -0,0 +1,67 @@ +- name: Stop Machine POCP_APPSVR01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_APPSVR01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: poweredoff + delegate_to: localhost +- name: Stop Machine POCP_DB01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_DB01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: poweredoff + delegate_to: localhost +- name: Stop Machine POCP_DC01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_DC01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: poweredoff + delegate_to: localhost +- name: Stop Machine POCP_RootCA + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_RootCA + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: poweredoff + delegate_to: localhost +- name: Stop Machine POCP_SG01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_SG01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: poweredoff + delegate_to: localhost +- name: Stop Machine POCP_SUPPSVR01 + vmware_guest: + hostname: "{{ vcenter_server }}" + username: "{{ vcenter_user }}" + password: "{{ vcenter_pass }}" + validate_certs: False + name: POCP_SUPPSVR01 + datacenter: "Datacenter" + cluster: "{{ cluster_name }}" + state: poweredoff + delegate_to: localhost + diff --git a/roles/esxi_stop/tests/inventory b/roles/esxi_stop/tests/inventory new file mode 100755 index 0000000..878877b --- /dev/null +++ b/roles/esxi_stop/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/esxi_stop/tests/test.yml b/roles/esxi_stop/tests/test.yml new file mode 100755 index 0000000..6618761 --- /dev/null +++ b/roles/esxi_stop/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - esxi_try \ No newline at end of file diff --git a/roles/esxi_stop/vars/main.yml b/roles/esxi_stop/vars/main.yml new file mode 100755 index 0000000..606eb2e --- /dev/null +++ b/roles/esxi_stop/vars/main.yml @@ -0,0 +1,15 @@ +--- +# vars file for Deploy_Vms +vcenter_server: "192.168.110.10" +vcenter_user: "administrator@gsmcs.local" +vcenter_pass: "GsmcGmv2Gmv*" +datacenter_name: "Datacenter" +folder_datacenter: "POCP_Prueba" +template_srv01: "POCP_APPSVR01" +template: "RHEL_Ansible_DHCP" +cluster_name: "GSMCSCluster" +net_name: "VM_GSMC_RED35" +guest_vcpu_gsmc1: "8" +guest_memory_gsmc1: "8000" +disk_size_gsmc1: "150" +vsphere_datastore: "Cabina-VM"