TASK [Baixa o arquivo de instalacao do Wordpress] ******************************
fatal: [172.17.177.40]: FAILED! => {"changed": false, "checksum_dest": null, "checksum_src": "61015720c679a6cbf9ad51701f0f3fedb51b3273", "dest": "/tmp/wordpress.tar.gz", "elapsed": 35, "gid": 1000, "group": "vagrant", "mode": "0440", "msg": "Destination /tmp/wordpress.tar.gz is not writable", "owner": "vagrant", "size": 12987499, "src": "/home/vagrant/.ansible/tmp/ansible-tmp-1605053824.3207972-2451998425278/tmpi7kn16", "state": "file", "uid": 1000, "url": "https://wordpress.org/latest.tar.gz"}
Meu playbook:
---
- hosts: all
tasks:
- name: 'Instala pacotes de dependencia do sistema operacional'
apt:
name: "{{ item }}"
state: latest
become: yes
with_items:
- php5
- apache2
- libapache2-mod-php5
- php5-gd
- libssh2-php
- php5-mcrypt
- mysql-server-5.6
- python-mysqldb
- php5-mysql
- name: 'Cria o banco no MySQL'
mysql_db:
name: wordpress_db
login_user: root
state: present
- name: 'Cria usuario no MySQL'
mysql_user:
login_user: root
name: wordpress_user
password: 12345
priv: 'wordpress_db.*:ALL'
state: present
- name: 'Baixa o arquivo de instalacao do Wordpress'
get_url:
url: 'https://wordpress.org/latest.tar.gz'
dest: '/tmp/wordpress.tar.gz'
- name: 'Descompacta o Wordpress'
unarchive:
src: '/tmp/wordpress.tar.gz'
dest: /var/www/
remote_src: yes
become: yes