diff --git a/eval b/eval deleted file mode 100644 index 4adc982..0000000 --- a/eval +++ /dev/null @@ -1,11 +0,0 @@ -#le module php n'est pas installé ou pas utilisé - -#présence du fichier de dépot - -#le service php-fpm tourne - - -# la page version.php existe - - -# la page version.php renvoie la bonne valeur \ No newline at end of file diff --git a/eval.yml b/eval.yml new file mode 100644 index 0000000..61a8b4f --- /dev/null +++ b/eval.yml @@ -0,0 +1,37 @@ +--- +- hosts: + - all + user: root + gather_facts: false + vars: + result_file: "tp_php-fpm" + + pre_tasks: + - name: insert header + lineinfile: + path: "{{ result_file }}" + line: "machine\tuser\tmod_php not installed\tremi repo\tphp-fpm running\tversoin.php exists\tphp correct install" + state: present + create: true + delegate_to: localhost + + tasks: + - name: copy script + copy: + src: "{{ item }}" + dest: /root + mode: 0700 + loop: + - functions.sh + - eval.sh + + - name: exec script + command: /root/eval.sh + register: result + + - name: get result + lineinfile: + path: "{{ result_file }}" + line: "{{ result.stdout }}" + create: true + delegate_to: localhost \ No newline at end of file