Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
puppet-modules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nbits
Puppet
puppet-modules
Merge requests
!4
Draft: Deploy roles
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
Draft: Deploy roles
feature/deploy-roles
into
master
Overview
0
Commits
1
Pipelines
9
Changes
2
Open
Draft: Deploy roles
drebs
requested to merge
feature/deploy-roles
into
master
Jan 6, 2021
Overview
0
Commits
1
Pipelines
9
Changes
2
0
0
Merge request reports
Viewing commit
eca3f17c
Show latest version
2 files
+
42
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
eca3f17c
Deploy role::onlyoffice using Libvirt
· eca3f17c
alcalina
authored
Jan 6, 2021
.scripts/deploy-role.sh
0 → 100755
+
30
−
0
View file @ eca3f17c
Edit in single-file editor
Open in Web IDE
#!/bin/bash
#
# Deploy a role using Puppet Apply.
set
-x
CLASS
=
${
1
}
if
[
-z
"
${
CLASS
}
"
]
;
then
echo
"Usage:
${
0
}
class"
exit
1
fi
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
REPO_DIR
=
"
$(
dirname
${
SCRIPT_DIR
}
)
"
apt update
apt
install
-qy
puppet
git
-C
${
REPO_DIR
}
submodule update
--init
# deploy a role
puppet apply
\
--detailed-exitcodes
\
--modulepath
${
REPO_DIR
}
/modules
\
--hiera-config
${
REPO_DIR
}
/hiera.yaml
\
--codedir
${
REPO_DIR
}
\
-e
"include
${
CLASS
}
"
test
"
${
?
}
"
=
2
||
exit
1
# Puppet exit code 2: The run succeeded, and some resources were changed.
Loading