Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
localhost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
webarch
localhost
Commits
93b4621c
Verified
Commit
93b4621c
authored
5 months ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
only install community.general when version is < 7
parent
584ff1a1
No related branches found
No related tags found
No related merge requests found
Pipeline
#35561
passed
5 months ago
Stage: bookworm
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible.sh
+9
-2
9 additions, 2 deletions
ansible.sh
with
9 additions
and
2 deletions
ansible.sh
+
9
−
2
View file @
93b4621c
...
...
@@ -182,8 +182,15 @@ which jc && \
# https://packages.ubuntu.com/jammy/jc
jc
--version
||
jc
-h
# Install community.general 7.5.9
/usr/bin/ansible-galaxy collection
install
"community.general:==7.5.9"
||
exit
# Get the first digit of the installed version of community.general
comgen_installed
=
$(
/usr/bin/ansible-galaxy collection list |
grep
community.general |
sort
-n
|
tail
-n1
|
awk
'{ print $2 }'
|
sed
's/[.][0-9][.][0-9]$//'
)
if
[[
"
${
comgen_installed
}
"
-lt
7
]]
;
then
# Install community.general 7.5.9
/usr/bin/ansible-galaxy collection
install
"community.general:==7.5.9"
||
exit
else
echo
"The version of community.general installed appears to be greater than 7.5.9, so skipping the comgen install"
fi
# Install the ansible roles
/usr/bin/ansible-galaxy
install
-r
requirements.yml
--force
||
exit
...
...
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