ansible/playbooks/hosts/communityblog.fedorainfracloud.org.yml
2015-08-16 02:25:53 +00:00

45 lines
1.2 KiB
YAML

- name: check/create instance
hosts: communityblog.fedorainfracloud.org
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/fedora-cloud.yml
- /srv/private/ansible/files/openstack/passwords.yml
tasks:
- include: "{{ tasks }}/persistent_cloud_new.yml"
- name: setup all the things
hosts: communityblog.fedorainfracloud.org
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/private/ansible/files/openstack/passwords.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- include: "{{ tasks }}/cloud_setup_basic.yml"
- name: set hostname (required by some services, at least postfix need it)
shell: "hostname {{inventory_hostname}}"
tasks:
- name: add packages
yum: state=present name={{ item }}
with_items:
- httpd
- php
- php-mysql
- mariadb-server
- mariadb
- mod_ssl
- php-mcrypt
- wget
- unzip
- name: set the SELinux policy for the Wordpress web dir
command: semanage fcontext -a -t httpd_sys_content_t "/var/www/html/(.*)"
#when: webcontext.stdout.find('httpd_sys_content_t') == -1