Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
serverdensity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Barney Hanlon
serverdensity
Commits
6b22b17e
Commit
6b22b17e
authored
9 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Tests and bug fixes
parent
697497a4
Branches
main
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
defaults/main.yml
+1
-1
1 addition, 1 deletion
defaults/main.yml
tasks/main.yml
+25
-24
25 additions, 24 deletions
tasks/main.yml
templates/etc-apache2-sites-available-sd-agent
+1
-0
1 addition, 0 deletions
templates/etc-apache2-sites-available-sd-agent
with
27 additions
and
25 deletions
defaults/main.yml
+
1
−
1
View file @
6b22b17e
...
@@ -17,5 +17,5 @@ sd_groups:
...
@@ -17,5 +17,5 @@ sd_groups:
sd_repo_public_key_uri
:
'
https://www.serverdensity.com/downloads/boxedice-public.key'
sd_repo_public_key_uri
:
'
https://www.serverdensity.com/downloads/boxedice-public.key'
sd_agent_plugins_dir
:
'
/usr/bin/sd-agent/plugins'
sd_agent_plugins_dir
:
'
/usr/bin/sd-agent/plugins'
sd_plugins_files_dir
:
"
{{
inventory
_dir
}}/files/sd-plugins"
sd_plugins_files_dir
:
"
{{
playbook
_dir
}}/files/sd-plugins"
sd_template_config
:
'
config.cfg'
sd_template_config
:
'
config.cfg'
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
25
−
24
View file @
6b22b17e
---
---
# file: roles/serverdensity/tasks/main.yml
# file: roles/serverdensity/tasks/main.yml
-
name
:
'
ServerDensity
|
Init
SD
plugin
'
-
name
:
"
ServerDensity
|
Init
SD
plugin
"
local_action
:
local_action
:
serverdensity
serverdensity
api_token={{sd_api_token}}
api_token={{
sd_api_token
}}
cleanup={{sd_alert_cleanup}}
cleanup={{
sd_alert_cleanup
}}
force={{ sd_force_update }}
force={{ sd_force_update }}
cache={{sd_api_cache_file}}
cache={{
sd_api_cache_file
}}
when
:
sd_update_remote
when
:
sd_update_remote
-
name
:
'
ServerDensity
|
Install
Public
Repo
Key
'
-
name
:
"
ServerDensity
|
Install
Public
Repo
Key
"
apt_key
:
apt_key
:
url=
"
{{ sd_repo_public_key_uri }}
"
url={{ sd_repo_public_key_uri }}
state=present
state=present
-
name
:
'
ServerDensity
|
Add
ServerDensity
Repository
To
Apt
'
-
name
:
"
ServerDensity
|
Add
ServerDensity
Repository
To
Apt
"
copy
:
copy
:
content='deb http://www.serverdensity.com/downloads/linux/deb all main'
content='deb http://www.serverdensity.com/downloads/linux/deb all main'
dest=
'
/etc/apt/sources.list.d/sd-agent.list
'
dest=/etc/apt/sources.list.d/sd-agent.list
mode=644
mode=644
-
name
:
'
ServerDensity
|
Install
The
Agent
'
-
name
:
"
ServerDensity
|
Install
The
Agent
"
apt
:
apt
:
pkg=sd-agent
pkg=sd-agent
state=installed
state=installed
update_cache=yes
update_cache=yes
notify
:
'
ServerDensity
|
Restart
Agent
'
notify
:
"
ServerDensity
|
Restart
Agent
"
-
name
:
'
ServerDensity
|
Create
Plugins
Directory
'
-
name
:
"
ServerDensity
|
Create
Plugins
Directory
"
file
:
file
:
dest=
"
{{ sd_agent_plugins_dir }}
"
dest={{ sd_agent_plugins_dir }}
state=directory
state=directory
mode=755
mode=755
-
name
:
'
ServerDensity
|
Copy
Plugins
'
-
name
:
"
ServerDensity
|
Copy
Plugins
"
copy
:
copy
:
src=
"
{{ sd_plugins_files_dir }}/{{item.1}}
"
src={{ sd_plugins_files_dir }}/{{
item.1
}}
dest=
"
{{ sd_agent_plugins_dir }}/{{item.1}}
"
dest={{ sd_agent_plugins_dir }}/{{
item.1
}}
with_items
:
sd_plugins|dictsort
with_items
:
sd_plugins|dictsort
when
:
sd_plugins|length >
0
when
:
sd_plugins|length >
0
notify
:
'
ServerDensity
|
Restart
Agent'
notify
:
"
ServerDensity
|
Restart
Agent"
-
name
:
'
ServerDensity
|
Configure
The
Agent'
-
name
:
"
ServerDensity
|
Configure
The
Agent"
template
:
src="{{ sd_template_config }}"
template
:
dest=/etc/sd-agent/config.cfg
src={{ sd_template_config }}
owner=root
dest=/etc/sd-agent/config.cfg
group=root
owner=root
mode=0644
group=root
mode=0644
when
:
sd_agent_key != ''
when
:
sd_agent_key != ''
notify
:
'
ServerDensity
|
Restart
Agent
'
notify
:
"
ServerDensity
|
Restart
Agent
"
-
include
:
apache.yml
-
include
:
apache.yml
when
:
sd_groups.apache != 'none' and inventory_hostname in groups[sd_groups.apache]
when
:
sd_groups.apache != 'none' and inventory_hostname in groups[sd_groups.apache]
This diff is collapsed.
Click to expand it.
templates/etc-apache2-sites-available-sd-agent
+
1
−
0
View file @
6b22b17e
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
Order Deny,Allow
Order Deny,Allow
Deny from all
Deny from all
Allow from 127.0.0.1{% for address in ansible_all_ipv4_addresses %} {{ address }}{% endfor %}
Allow from 127.0.0.1{% for address in ansible_all_ipv4_addresses %} {{ address }}{% endfor %}
</Location>
</Location>
ServerName {{ inventory_hostname }}
ServerName {{ inventory_hostname }}
</VirtualHost>
</VirtualHost>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment