Files
tp_php-fpm/eval.yml
2020-11-02 10:17:49 +01:00

37 lines
730 B
YAML

---
- 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