Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Commit

Permalink
#14 updated config generation should do away with shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
donsizemore committed Apr 19, 2016
1 parent 118d039 commit b5540c4
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 1 deletion.
21 changes: 20 additions & 1 deletion ansible/playbooks/local-services-cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
sudo: false
gather_facts: false
vars_files:
- ~/group_vars/odum
- ../group_vars/{{de_env}}
pre_tasks:
- name: create the output directory
file: path={{de_config_dir}} state=directory
Expand Down Expand Up @@ -92,6 +92,16 @@
- role: util-cfg-service
service_name_short: "{{user_sessions.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{templeton_periodic.service_name_short}}"
src: "templeton-periodic.yaml.j2"
dest: "{{service_conf_dir}}/templeton-periodic.yaml"

- role: util-cfg-service
service_name_short: "{{templeton_incremental.service_name_short}}"
src: "templeton-incremental.yaml.j2"
dest: "{{service_conf_dir}}/templeton-incremental.yaml"

- role: util-cfg-service
src: "ui/de-application.yaml.j2"
dest: "{{service_conf_dir}}/de-application.yaml"
Expand All @@ -116,3 +126,12 @@
src: "docker-cleanup/docker-gc-exclude.j2"
dest: "{{service_conf_dir}}/docker-gc-exclude"
service_name_short: "docker-gc"

- role: util-cfg-service
service_name_short: jobservices
service_cfg_file_name: jobservices.yml

- role: util-cfg-service
service_name_short: "{{permissions.service_name_short}}"
src: "permissions.yaml.j2"
dest: "{{service_conf_dir}}/permissions.yaml"
118 changes: 118 additions & 0 deletions ansible/playbooks/local-services-cfg.yml.20160226
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Set de_config_dir to the local directory.
# Example: ansible-playbook -i inventories/production.cfg --extra-vars "de_config_dir=$(pwd)/foo playbook=playbooks/local-services-cfg.yml owner=$(whoami) group=staff de_env=production" --tags="service_config,logging_config" single-role.yaml

---
- hosts: localhost
sudo: false
gather_facts: false
vars_files:
- ~/group_vars/odum
pre_tasks:
- name: create the output directory
file: path={{de_config_dir}} state=directory
tags:
- service_config

- name: create the logging directory
file: path={{de_config_dir}}/logging state=directory
tags:
- logging_config

- name: create the logstash-forwarder directory
file: path={{de_config_dir}}/logstash-forwarder state=directory
tags:
- logging_config

- name: create the nginx config
file: path={{de_config_dir}}/nginx state=directory
tags:
- service_config

roles:
- role: util-cfg-service
service_name_short: "{{anon_files.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{apps.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{clockwork.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{condor_log_monitor.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{data_info.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{dewey.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{exim.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{info_typer.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{infosquito.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{iplant_email.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{iplant_groups.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{jexevents.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{kifshare.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{metadata.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{monkey.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{notificationagent.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{saved_searches.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{terrain.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{tree_urls.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{user_preferences.service_name_short}}"

- role: util-cfg-service
service_name_short: "{{user_sessions.service_name_short}}"

- role: util-cfg-service
src: "ui/de-application.yaml.j2"
dest: "{{service_conf_dir}}/de-application.yaml"
service_name_short: "{{de.service_name_short}}"

- role: util-cfg-service
src: "ui/de.properties.j2"
dest: "{{service_conf_dir}}/de.properties"
service_name_short: "{{de.service_name_short}}"

- role: util-cfg-service
src: "ui/nginx.conf.j2"
dest: "{{service_conf_dir}}/nginx/nginx.conf"
service_name_short: "{{de.service_name_short}}"

- role: util-cfg-service
src: "docker-cleanup/docker-gc-exclude-containers.j2"
dest: "{{service_conf_dir}}/docker-gc-exclude-containers"
service_name_short: "docker-gc"

- role: util-cfg-service
src: "docker-cleanup/docker-gc-exclude.j2"
dest: "{{service_conf_dir}}/docker-gc-exclude"
service_name_short: "docker-gc"

0 comments on commit b5540c4

Please sign in to comment.