Skip to content
Snippets Groups Projects
Commit 7b2c1fdf authored by Barney Hanlon's avatar Barney Hanlon
Browse files

Make some variables overridable and check if we need sd_plugins to be copied

parent f641fc4a
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,10 @@ sd_groups:
apache: 'none'
mysql: 'none'
proxy: 'none'
sd_repo_public_key_uri: 'https://www.serverdensity.com/downloads/boxedice-public.key'
sd_agent_plugins_dir: '/usr/bin/sd-agent/plugins'
sd_plugins_files_dir: "{{inventory_dir}}/files/sd-plugins"
sd_template_config: 'config.cfg'
...
......@@ -11,7 +11,7 @@
- name: 'ServerDensity | Install Public Repo Key'
apt_key:
url='https://www.serverdensity.com/downloads/boxedice-public.key'
url="{{ sd_repo_public_key_uri }}"
state=present
- name: 'ServerDensity | Add ServerDensity Repository To Apt'
......@@ -29,19 +29,20 @@
- name: 'ServerDensity | Create Plugins Directory'
file:
dest='/usr/bin/sd-agent/plugins'
dest="{{ sd_agent_plugins_dir }}"
state=directory
mode=755
- name: 'ServerDensity | Copy Plugins'
copy:
src={{inventory_dir}}/files/sd-plugins/{{item.1}}
dest=/usr/bin/sd-agent/plugins/{{item.1}}
src="{{ sd_plugins_files_dir }}/{{item.1}}"
dest="{{ sd_agent_plugins_dir }}/{{item.1}}"
with_items: sd_plugins|dictsort
when: sd_plugins|length > 0
notify: 'ServerDensity | Restart Agent'
- name: 'ServerDensity | Configure The Agent'
template: src=config.cfg
template: src="{{ sd_template_config }}"
dest=/etc/sd-agent/config.cfg
owner=root
group=root
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment