Skip to content

Instantly share code, notes, and snippets.

@xuxiaodong
Created December 12, 2013 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuxiaodong/7923608 to your computer and use it in GitHub Desktop.
Save xuxiaodong/7923608 to your computer and use it in GitHub Desktop.
---
# This playbook deploys the AWX application (database, web and worker) to a
# single server.
- hosts: all
tasks:
- name: group hosts by distribution
group_by: key="{{ ansible_distribution }}-{{ ansible_distribution_version }}"
- hosts: RedHat-6*:CentOS-6*:SL-6*
user: root
roles:
- { role: packages_el6 }
- { role: postgres, pg_hba_location: "/var/lib/pgsql/data/pg_hba.conf" }
- { role: awx_install }
- { role: supervisor, sup_init_name: "supervisord", sup_conf_location: "/etc/supervisord.conf" }
- { role: httpd, httpd_init_name: "httpd" }
- { role: iptables }
- { role: misc }
- hosts: Ubuntu-12*:Ubuntu-13*:Debian*
user: root
roles:
- { role: packages_ubuntu }
- { role: postgres, pg_hba_location: "/etc/postgresql/9.3/main/pg_hba.conf" }
- { role: awx_install }
- { role: supervisor, sup_init_name: "supervisor", sup_conf_location: "/etc/supervisor/conf.d/awx.conf" }
- { role: httpd, httpd_init_name: "apache2" }
- { role: misc }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment