Browse Source

Add ansible TP

master
root 2 years ago
parent
commit
f470a85ef0
  1. 0
      Pepiniere/Ansible/Formation/.gitignore
  2. 0
      Pepiniere/Ansible/Formation/.gitlab-ci.yml
  3. 0
      Pepiniere/Ansible/Formation/.gitmodules
  4. 0
      Pepiniere/Ansible/Formation/0.Introduction-formation.md
  5. 0
      Pepiniere/Ansible/Formation/1.Introduction-ansible.md
  6. 0
      Pepiniere/Ansible/Formation/10.bonnes-pratiques.md
  7. 0
      Pepiniere/Ansible/Formation/2.installation-inventaire.md
  8. 0
      Pepiniere/Ansible/Formation/3.commandes-ad-hoc.md
  9. 0
      Pepiniere/Ansible/Formation/4.playbooks.md
  10. 0
      Pepiniere/Ansible/Formation/5.roles.md
  11. 0
      Pepiniere/Ansible/Formation/6.structures-de-controle.md
  12. 0
      Pepiniere/Ansible/Formation/7.templates.md
  13. 0
      Pepiniere/Ansible/Formation/8.notions-avancees.md
  14. 0
      Pepiniere/Ansible/Formation/9.Ansible-Galaxy.md
  15. 0
      Pepiniere/Ansible/Formation/README.md
  16. 0
      Pepiniere/Ansible/Formation/ansible-config-virtualbox-vms.md
  17. 0
      Pepiniere/Ansible/Formation/images/ansible-ad-hoc-deployment-workflow.png
  18. 0
      Pepiniere/Ansible/Formation/images/ansible-ad-hoc-multi-node-deployment.png
  19. 0
      Pepiniere/Ansible/Formation/images/ansible-archi-playbooks.png
  20. 0
      Pepiniere/Ansible/Formation/images/ansible-archi-roles.png
  21. 0
      Pepiniere/Ansible/Formation/images/ansible-archi-ssh.png
  22. 0
      Pepiniere/Ansible/Formation/images/ansible-galaxy-site.png
  23. 0
      Pepiniere/Ansible/Formation/images/ansible-playbook-deployment-workflow.png
  24. 0
      Pepiniere/Ansible/Formation/images/ansible-playbook-multi-node-deployment-workflow.png
  25. 0
      Pepiniere/Ansible/Formation/images/ci-vs-cd-devops-difference.jpg
  26. 0
      Pepiniere/Ansible/Formation/images/logo-ansible.svg
  27. 0
      Pepiniere/Ansible/Formation/images/logo-molecule.png
  28. 0
      Pepiniere/Ansible/Formation/images/logo-testinfra.svg
  29. 0
      Pepiniere/Ansible/Formation/images/manual-deployment-without-ansible.png
  30. 0
      Pepiniere/Ansible/Formation/images/tower-dashboard.png
  31. 0
      Pepiniere/Ansible/Formation/images/tp.gif
  32. 0
      Pepiniere/Ansible/Formation/index.html
  33. 0
      Pepiniere/Ansible/Formation/introduction.html
  34. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/2.tp-deploiement-app.md
  35. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/apache-handlers.yaml
  36. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/apache-install.yaml
  37. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/mariadb-install.yaml
  38. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/mariadb-wordpress-configure.yaml
  39. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/wordpress-configure.yaml
  40. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/wordpress-install.yaml
  41. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/install-apache-wordpress-mariadb-imports.yaml
  42. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/apache-wordpress-mariadb-roles-password.yaml
  43. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/inventories/formation/group_vars/centos7.yaml
  44. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/inventories/formation/hosts
  45. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/passwords.txt
  46. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/apache-install/tasks/main.yaml
  47. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/mariadb-configure/tasks/main.yml
  48. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/mariadb-install/tasks/main.yaml
  49. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/wordpress-configure/tasks/main.yml
  50. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/wordpress-install/tasks/main.yml
  51. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/inventories/formation/group_vars/wordpress.yaml
  52. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/inventories/formation/hosts
  53. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/playbook.yaml
  54. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/apache/tasks/main.yaml
  55. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/defaults/main.yml
  56. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/add-database.yml
  57. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/install.yaml
  58. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/main.yaml
  59. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/meta/main.yml
  60. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/configure.yml
  61. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/install.yml
  62. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/main.yaml
  63. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress/hosts
  64. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress/install-apache-wordpress-mariadb.yaml
  65. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress/script-tp2.sh
  66. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/images/ansible-archi-ssh.png
  67. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/images/ansible-galaxy-search-role.png
  68. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/revealjs
  69. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-divers.html
  70. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-divers.md
  71. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-galaxy.html
  72. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-galaxy.md
  73. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-imports.html
  74. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-imports.md
  75. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-inventaire.html
  76. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-inventaire.md
  77. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-les-commandes-ad-hoc.html
  78. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-les-commandes-ad-hoc.md
  79. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-playbooks.html
  80. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-playbooks.md
  81. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-roles.html
  82. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-roles.md
  83. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-structures-de-controle.html
  84. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-structures-de-controle.md
  85. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-templates.html
  86. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-templates.md
  87. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-vault.html
  88. 0
      Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-vault.md
  89. 2
      Pepiniere/Ansible/Travaux_pratiques/ansible.cfg
  90. 7
      Pepiniere/Ansible/Travaux_pratiques/inventories/formation/group_vars/all/vault
  91. 5
      Pepiniere/Ansible/Travaux_pratiques/inventories/formation/group_vars/wordpress.yaml
  92. 23
      Pepiniere/Ansible/Travaux_pratiques/inventories/formation/hosts
  93. 5
      Pepiniere/Ansible/Travaux_pratiques/playbook-vault.yaml
  94. 9
      Pepiniere/Ansible/Travaux_pratiques/playbook.yaml
  95. 14
      Pepiniere/Ansible/Travaux_pratiques/playbooks/configure_mariadb.yaml
  96. 28
      Pepiniere/Ansible/Travaux_pratiques/playbooks/configure_postgre.yaml
  97. 32
      Pepiniere/Ansible/Travaux_pratiques/playbooks/configure_wordpress.yaml
  98. 26
      Pepiniere/Ansible/Travaux_pratiques/playbooks/create_web_server.yaml
  99. 115
      Pepiniere/Ansible/Travaux_pratiques/playbooks/create_wordpress.yaml
  100. 10
      Pepiniere/Ansible/Travaux_pratiques/playbooks/get-user-id.yaml
  101. Some files were not shown because too many files have changed in this diff Show More

0
Pepiniere/ansible/.gitignore → Pepiniere/Ansible/Formation/.gitignore vendored

0
Pepiniere/ansible/.gitlab-ci.yml → Pepiniere/Ansible/Formation/.gitlab-ci.yml

0
Pepiniere/ansible/.gitmodules → Pepiniere/Ansible/Formation/.gitmodules vendored

0
Pepiniere/ansible/0.Introduction-formation.md → Pepiniere/Ansible/Formation/0.Introduction-formation.md

0
Pepiniere/ansible/1.Introduction-ansible.md → Pepiniere/Ansible/Formation/1.Introduction-ansible.md

0
Pepiniere/ansible/10.bonnes-pratiques.md → Pepiniere/Ansible/Formation/10.bonnes-pratiques.md

0
Pepiniere/ansible/2.installation-inventaire.md → Pepiniere/Ansible/Formation/2.installation-inventaire.md

0
Pepiniere/ansible/3.commandes-ad-hoc.md → Pepiniere/Ansible/Formation/3.commandes-ad-hoc.md

0
Pepiniere/ansible/4.playbooks.md → Pepiniere/Ansible/Formation/4.playbooks.md

0
Pepiniere/ansible/5.roles.md → Pepiniere/Ansible/Formation/5.roles.md

0
Pepiniere/ansible/6.structures-de-controle.md → Pepiniere/Ansible/Formation/6.structures-de-controle.md

0
Pepiniere/ansible/7.templates.md → Pepiniere/Ansible/Formation/7.templates.md

0
Pepiniere/ansible/8.notions-avancees.md → Pepiniere/Ansible/Formation/8.notions-avancees.md

0
Pepiniere/ansible/9.Ansible-Galaxy.md → Pepiniere/Ansible/Formation/9.Ansible-Galaxy.md

0
Pepiniere/ansible/README.md → Pepiniere/Ansible/Formation/README.md

0
Pepiniere/ansible/ansible-config-virtualbox-vms.md → Pepiniere/Ansible/Formation/ansible-config-virtualbox-vms.md

0
Pepiniere/ansible/images/ansible-ad-hoc-deployment-workflow.png → Pepiniere/Ansible/Formation/images/ansible-ad-hoc-deployment-workflow.png

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

0
Pepiniere/ansible/images/ansible-ad-hoc-multi-node-deployment.png → Pepiniere/Ansible/Formation/images/ansible-ad-hoc-multi-node-deployment.png

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

0
Pepiniere/ansible/images/ansible-archi-playbooks.png → Pepiniere/Ansible/Formation/images/ansible-archi-playbooks.png

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

0
Pepiniere/ansible/images/ansible-archi-roles.png → Pepiniere/Ansible/Formation/images/ansible-archi-roles.png

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

0
Pepiniere/ansible/images/ansible-archi-ssh.png → Pepiniere/Ansible/Formation/images/ansible-archi-ssh.png

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

0
Pepiniere/ansible/images/ansible-galaxy-site.png → Pepiniere/Ansible/Formation/images/ansible-galaxy-site.png

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

0
Pepiniere/ansible/images/ansible-playbook-deployment-workflow.png → Pepiniere/Ansible/Formation/images/ansible-playbook-deployment-workflow.png

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

0
Pepiniere/ansible/images/ansible-playbook-multi-node-deployment-workflow.png → Pepiniere/Ansible/Formation/images/ansible-playbook-multi-node-deployment-workflow.png

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

0
Pepiniere/ansible/images/ci-vs-cd-devops-difference.jpg → Pepiniere/Ansible/Formation/images/ci-vs-cd-devops-difference.jpg

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 135 KiB

0
Pepiniere/ansible/images/logo-ansible.svg → Pepiniere/Ansible/Formation/images/logo-ansible.svg

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

0
Pepiniere/ansible/images/logo-molecule.png → Pepiniere/Ansible/Formation/images/logo-molecule.png

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

0
Pepiniere/ansible/images/logo-testinfra.svg → Pepiniere/Ansible/Formation/images/logo-testinfra.svg

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

0
Pepiniere/ansible/images/manual-deployment-without-ansible.png → Pepiniere/Ansible/Formation/images/manual-deployment-without-ansible.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
Pepiniere/ansible/images/tower-dashboard.png → Pepiniere/Ansible/Formation/images/tower-dashboard.png

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

0
Pepiniere/ansible/images/tp.gif → Pepiniere/Ansible/Formation/images/tp.gif

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

0
Pepiniere/ansible/index.html → Pepiniere/Ansible/Formation/index.html

0
Pepiniere/ansible/introduction.html → Pepiniere/Ansible/Formation/introduction.html

0
Pepiniere/ansible/travaux-pratiques/2.tp-deploiement-app.md → Pepiniere/Ansible/Formation/travaux-pratiques/2.tp-deploiement-app.md

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/imports/apache-handlers.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/apache-handlers.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/imports/apache-install.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/apache-install.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/imports/mariadb-install.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/mariadb-install.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/imports/mariadb-wordpress-configure.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/mariadb-wordpress-configure.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/imports/wordpress-configure.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/wordpress-configure.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/imports/wordpress-install.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/imports/wordpress-install.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-imports/install-apache-wordpress-mariadb-imports.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-imports/install-apache-wordpress-mariadb-imports.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/apache-wordpress-mariadb-roles-password.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/apache-wordpress-mariadb-roles-password.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/inventories/formation/group_vars/centos7.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/inventories/formation/group_vars/centos7.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/inventories/formation/hosts → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/inventories/formation/hosts

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/passwords.txt → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/passwords.txt

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/roles/apache-install/tasks/main.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/apache-install/tasks/main.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/roles/mariadb-configure/tasks/main.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/mariadb-configure/tasks/main.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/roles/mariadb-install/tasks/main.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/mariadb-install/tasks/main.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/roles/wordpress-configure/tasks/main.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/wordpress-configure/tasks/main.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles-password/roles/wordpress-install/tasks/main.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles-password/roles/wordpress-install/tasks/main.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/inventories/formation/group_vars/wordpress.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/inventories/formation/group_vars/wordpress.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/inventories/formation/hosts → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/inventories/formation/hosts

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/playbook.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/playbook.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/apache/tasks/main.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/apache/tasks/main.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/defaults/main.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/defaults/main.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/add-database.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/add-database.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/install.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/install.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/main.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/mariadb/tasks/main.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/meta/main.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/meta/main.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/configure.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/configure.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/install.yml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/install.yml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/main.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress-roles/roles/wordpress/tasks/main.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress/hosts → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress/hosts

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress/install-apache-wordpress-mariadb.yaml → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress/install-apache-wordpress-mariadb.yaml

0
Pepiniere/ansible/travaux-pratiques/files/tp-wordpress/script-tp2.sh → Pepiniere/Ansible/Formation/travaux-pratiques/files/tp-wordpress/script-tp2.sh

0
Pepiniere/ansible/travaux-pratiques/images/ansible-archi-ssh.png → Pepiniere/Ansible/Formation/travaux-pratiques/images/ansible-archi-ssh.png

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

0
Pepiniere/ansible/travaux-pratiques/images/ansible-galaxy-search-role.png → Pepiniere/Ansible/Formation/travaux-pratiques/images/ansible-galaxy-search-role.png

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

0
Pepiniere/ansible/travaux-pratiques/revealjs → Pepiniere/Ansible/Formation/travaux-pratiques/revealjs

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-divers.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-divers.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-divers.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-divers.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-galaxy.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-galaxy.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-galaxy.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-galaxy.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-imports.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-imports.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-imports.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-imports.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-inventaire.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-inventaire.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-inventaire.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-inventaire.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-les-commandes-ad-hoc.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-les-commandes-ad-hoc.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-les-commandes-ad-hoc.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-les-commandes-ad-hoc.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-playbooks.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-playbooks.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-playbooks.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-playbooks.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-roles.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-roles.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-roles.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-roles.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-structures-de-controle.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-structures-de-controle.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-structures-de-controle.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-structures-de-controle.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-templates.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-templates.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-templates.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-templates.md

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-vault.html → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-vault.html

0
Pepiniere/ansible/travaux-pratiques/tp-ansible-vault.md → Pepiniere/Ansible/Formation/travaux-pratiques/tp-ansible-vault.md

2
Pepiniere/Ansible/Travaux_pratiques/ansible.cfg

@ -0,0 +1,2 @@
[defaults]
vault_password_file = vault-password

7
Pepiniere/Ansible/Travaux_pratiques/inventories/formation/group_vars/all/vault

@ -0,0 +1,7 @@
$ANSIBLE_VAULT;1.1;AES256
33366532393138353666653365633234396238316366613234383661316466323333376565366333
3830646663633362313234656439663962323666633935350a393632336239343963626135623962
34363931383263346663636235656236653762346561366536383630356263616565643365336138
3264376566383861650a643261343935306564646165333831666530643231303430346134653836
32623163396533373735616534313536646261633630346562356139353230326161336561613739
3132613930623633613437633665653361316566666465313338

5
Pepiniere/Ansible/Travaux_pratiques/inventories/formation/group_vars/wordpress.yaml

@ -0,0 +1,5 @@
DB_NAME: wordpress_db
DB_USER_NAME: admin
DB_USER_PASSWORD: admin
DB_HOST: "{{ hostvars['ansible-2']['ansible_host'] }}"
WEB_HOST: "{{ hostvars['ansible-1']['ansible_host'] }}"

23
Pepiniere/Ansible/Travaux_pratiques/inventories/formation/hosts

@ -0,0 +1,23 @@
ansible-1 ansible_host=192.168.56.52
ansible-2 ansible_host=192.168.56.54
ansible-3 ansible_host=192.168.56.56
ansible-4 ansible_host=192.168.56.58 ansible_user=root
[centos]
ansible-1
ansible-2
ansible-3
[debian]
ansible-4
[tous:children]
centos
debian
[wordpress]
ansible-1
ansible-2

5
Pepiniere/Ansible/Travaux_pratiques/playbook-vault.yaml

@ -0,0 +1,5 @@
- hosts: ansible-3
tasks:
- name: Display secure password
debug:
msg: "Robert's password is: {{ vault_robert_password }}"

9
Pepiniere/Ansible/Travaux_pratiques/playbook.yaml

@ -0,0 +1,9 @@
- hosts: ansible-2
roles:
- role: postgre
- hosts: ansible-1
roles:
- role: apache
- role: wordpress

14
Pepiniere/Ansible/Travaux_pratiques/playbooks/configure_mariadb.yaml

@ -0,0 +1,14 @@
- name: create a new database
mysql_db:
# login_unix_socket: /var/run/mysqld/mysqld.sock
name: '{{ DB_NAME }}'
state: present
- name: create a new user in database
mysql_user:
# login_unix_socket: /var/run/mysqld/mysqld.sock
name: '{{ DB_USER_NAME }}'
password: '{{ DB_USER_PASSWORD }}'
priv: '{{ DB_NAME }}.*:ALL'
host: '{{ DB_HOST }}'
state: present

28
Pepiniere/Ansible/Travaux_pratiques/playbooks/configure_postgre.yaml

@ -0,0 +1,28 @@
- name: create a new database
become: yes
become_user: postgres
postgresql_db:
# login_unix_socket: /var/run/mysqld/mysqld.sock
name: '{{ DB_NAME }}'
state: present
- name: create a new user in database
become: yes
become_user: postgres
postgresql_user:
# login_unix_socket: /var/run/mysqld/mysqld.sock
db: '{{ DB_NAME }}'
name: '{{ DB_USER_NAME }}'
password: '{{ DB_USER_PASSWORD }}'
priv: ALL
expires: infinity
# - name: grant all privileges
# become: yes
# become_user: postgres
# postgresql_privs:
# db: "{{ 'DB_NAME' }}"
# privs: ALL
# type: database
# role:

32
Pepiniere/Ansible/Travaux_pratiques/playbooks/configure_wordpress.yaml

@ -0,0 +1,32 @@
- name: Create wordpress configuration file
copy:
src: /var/www/html/wordpress/wp-config-sample.php
dest: /var/www/html/wordpress/wp-config.php
remote_src: yes
- name: Wordpress conf, db name
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'database_name_here'
replace: '{{ DB_NAME }}'
- name: Wordpress conf, db username
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'username_here'
replace: '{{ DB_USER_NAME }}'
- name: Wordpress conf, db passwd
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'password_here'
replace: '{{ DB_USER_PASSWORD }}'
- name: Wordpress conf, db host
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'localhost'
replace: '192.168.56.54'

26
Pepiniere/Ansible/Travaux_pratiques/playbooks/create_web_server.yaml

@ -0,0 +1,26 @@
- hosts: ansible-1
tasks:
- name: Install and launch httpd
yum:
name: httpd
state: present
update_cache: yes
- name: Set https systemctl enable
service:
name: httpd
state: started
enabled: yes
- name: Copy static web page
copy:
src: index.html
dest: /var/www/html/index.html
mode: 0444
- name: Configure firewalld
firewalld:
service: http
permanent: yes
state: enabled
immediate: yes

115
Pepiniere/Ansible/Travaux_pratiques/playbooks/create_wordpress.yaml

@ -0,0 +1,115 @@
- hosts: ansible-2
tasks:
- name: install mariadb-server # DONE
yum:
name:
- MySQL-python
- mariadb-server
- python3-pip
- python3
- firewalld
state: present
update_cache: yes
# - name: Install pymysql
# pip:
# name: PyMySQL
# state: present
# executable: pip3
- name: create a new database #DONE
mysql_db:
# login_unix_socket: /var/run/mysqld/mysqld.sock
name: wordpress_db
state: present
- name: create a new user in database wordpress_db #DONE
mysql_user:
# login_unix_socket: /var/run/mysqld/mysqld.sock
name: admin
password: admin
priv: 'wordpress_db.*:ALL'
host: 192.168.56.52
state: present
- name: configure firewalld # DONE
firewalld:
service: mysql
permanent: true
state: enabled
immediate: yes
- hosts: ansible-1
tasks:
- name: Install https, php, php-mysqlnd, firewalld
yum:
name:
- httpd
- php
- php-mysqlnd
- firewalld
- php-fpm
state: present
update_cache: yes
- name: Enable systemctl service installed
service:
name: httpd
state: started
enabled: yes
- name: Enable php
service:
name: php-fpm
state: started
enabled: yes
- name: Configure firewalld
firewalld:
service: http
permanent: yes
state: enabled
immediate: yes
- name: Install wordpress 5.0.8
unarchive:
src: https://wordpress.org/latest.tar.gz
dest: /var/www/html/
remote_src: yes
- name: Create wordpress configuration file
copy:
src: /var/www/html/wordpress/wp-config-sample.php
dest: /var/www/html/wordpress/wp-config.php
remote_src: yes
- name: Wordpress conf, db name
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'database_name_here'
replace: wordpress_db
- name: Wordpress conf, db username
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'username_here'
replace: admin
- name: Wordpress conf, db passwd
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'password_here'
replace: admin
- name: Wordpress conf, db host
replace:
dest: /var/www/html/wordpress/wp-config.php
regexp: 'localhost'
replace: 192.168.156.54
- name: restart httpd service
service:
name: httpd
state: restarted

10
Pepiniere/Ansible/Travaux_pratiques/playbooks/get-user-id.yaml

@ -0,0 +1,10 @@
- hosts: all
tasks:
- name: Get user id
command: id
register: user_id
- name: Display user id
ansible.builtin.debug:
var: user_id.stdout

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save