Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ansible
roles
nagios-nrpe-agent
Commits
56f4acaf
Verified
Commit
56f4acaf
authored
Sep 25, 2019
by
Dan Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mainly just update quoting
parent
6aaa5134
Pipeline
#7593
failed with stage
in 6 minutes and 2 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
26 deletions
+24
-26
.gitlab-ci.yml
.gitlab-ci.yml
+12
-14
tasks/main.yml
tasks/main.yml
+11
-11
tests/test-playbook.yml
tests/test-playbook.yml
+1
-1
No files found.
.gitlab-ci.yml
View file @
56f4acaf
...
...
@@ -4,7 +4,7 @@ cache:
key
:
${CI_COMMIT_REF_SLUG}
stages
:
-
test
-
test
variables
:
MIRROR_VALUES_FILE
:
tests/triumf-mirror-values.yml
...
...
@@ -13,24 +13,22 @@ centos7_test_install:
stage
:
test
image
:
centos:centos7
before_script
:
-
|
yum -y update && yum -y install ansible git
echo "localhost" > tests/inventory
mkdir -p tests/roles
ln -s $(pwd) tests/roles/nagios-nrpe-agent
-
yum -y update && yum -y install ansible git
-
echo "localhost" > tests/inventory
-
mkdir -p tests/roles
-
ln -s $(pwd) tests/roles/nagios-nrpe-agent
after_script
:
-
rm -rf tests/roles
-
rm -f $MIRROR_VALUES_FILE
-
rm -rf tests/roles
-
rm -f $MIRROR_VALUES_FILE
script
:
-
|
set -ex
-
set -ex
# Basic role syntax check
ansible-galaxy install --force --role-file=requirements.yml
ansible-playbook --list-hosts tests/test-playbook.yml --inventory tests/inventory --connection local
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --syntax-check
-
ansible-galaxy install --force --role-file=requirements.yml
-
ansible-playbook --list-hosts tests/test-playbook.yml --inventory tests/inventory --connection local
-
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --syntax-check
# Run the first time
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
-
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
-
>
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
...
...
tasks/main.yml
View file @
56f4acaf
...
...
@@ -2,10 +2,10 @@
include_vars
:
"
{{
file
|
basename
}}"
# This include_vars module is kind of dumb, so we need to test the full path but only include basename
with_first_found
:
-
files
:
-
"
{{
role_path
}}/vars/{{
ansible_distribution
|
lower
}}-{{
ansible_distribution_major_version
}}.yml
"
-
"
{{
role_path
}}/vars/{{
ansible_distribution
|
lower
}}.yml
"
-
"
{{
role_path
}}/vars/{{
ansible_os_family
|
lower
}}.yml
"
-
"
{{
role_path
}}/vars/default.yml
"
-
'
{{
role_path
}}/vars/{{
ansible_distribution
|
lower
}}-{{
ansible_distribution_major_version
}}.yml
'
-
'
{{
role_path
}}/vars/{{
ansible_distribution
|
lower
}}.yml
'
-
'
{{
role_path
}}/vars/{{
ansible_os_family
|
lower
}}.yml
'
-
'
{{
role_path
}}/vars/default.yml
'
skip
:
true
loop_control
:
loop_var
:
file
...
...
@@ -14,10 +14,10 @@
include_tasks
:
"
{{
file
}}"
with_first_found
:
-
files
:
-
"
tasks/{{
ansible_distribution
|
lower
}}-{{
ansible_distribution_major_version
}}-dependencies.yml
"
-
"
tasks/{{
ansible_distribution
|
lower
}}-dependencies.yml
"
-
"
tasks/{{
ansible_os_family
|
lower
}}-dependencies.yml
"
-
"
tasks/default-dependencies.yml
"
-
'
{{
role_path
}}/
tasks/{{
ansible_distribution
|
lower
}}-{{
ansible_distribution_major_version
}}-dependencies.yml
'
-
'
{{
role_path
}}/
tasks/{{
ansible_distribution
|
lower
}}-dependencies.yml
'
-
'
{{
role_path
}}/
tasks/{{
ansible_os_family
|
lower
}}-dependencies.yml
'
-
'
{{
role_path
}}/
tasks/default-dependencies.yml
'
skip
:
true
loop_control
:
loop_var
:
file
...
...
@@ -43,12 +43,12 @@
-
name
:
Install extra config files
template
:
src
:
"
{{
config_file
}}.j2
"
dest
:
"
/etc/nrpe.d/{{
config_file
|
basename
}}
"
src
:
'
{{
config_file
}}.j2
'
dest
:
'
/etc/nrpe.d/{{
config_file
|
basename
}}
'
owner
:
root
group
:
root
mode
:
0644
loop
:
"
{{
extra_config_files
}}
"
loop
:
'
{{
extra_config_files
}}
'
loop_control
:
loop_var
:
config_file
register
:
nrpe_extra_cfg_file
...
...
tests/test-playbook.yml
View file @
56f4acaf
---
-
hosts
:
all
roles
:
-
role
:
nagios-nrpe-agent
-
role
:
nagios-nrpe-agent
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment