Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
de2f4cf0
Commit
de2f4cf0
authored
Nov 15, 2013
by
jctanner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4912 from zehome/openbsd_pkg_flavourfix
OpenBSD packages can be installed using 'flavour'
parents
2c33737b
12e7e3b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
CHANGELOG.md
+1
-0
library/packaging/openbsd_pkg
+13
-0
No files found.
CHANGELOG.md
View file @
de2f4cf0
...
...
@@ -63,6 +63,7 @@ Misc changes:
*
Fixes for IPv6 addresses in inventory text files
*
name of executable can be passed to pip/gem etc, for installing under
*different*
interpreters
*
copy of ./hacking/env-setup added for fish users, ./hacking/env-setup.fish
*
openbsd_pkg can handle "flavoured" packages like vim--no_x11
1.
3.4 "Top of the World" (reprise) - October 29, 2013
...
...
library/packaging/openbsd_pkg
View file @
de2f4cf0
...
...
@@ -52,6 +52,9 @@ EXAMPLES = '''
# Make sure nmap is not installed
- openbsd_pkg: name=nmap state=absent
# Make sure vim is installed using no_x11 flavour
- openbsd_pkg name=vim--no_x11 state=present
'''
# Function used for executing commands.
...
...
@@ -81,13 +84,23 @@ def get_current_name(name, specific_version, module):
return
current_name
# Function used to find out if a package is currently installed.
# OpenBSD packages can contain "flavours"
# For example vim is distributed as a "gtk2":
# - vim--gtk2
# and "no_x11" flavour:
# - vim--no_x11
def
get_package_state
(
name
,
specific_version
,
module
):
info_cmd
=
'pkg_info -e'
if
specific_version
:
syntax
=
"
%
s
%
s"
else
:
if
"--"
in
name
:
(
name
,
flavour
)
=
name
.
split
(
"--"
,
1
)
syntax
=
"
%
s
%
s-*"
if
flavour
:
syntax
+=
"-
%
s"
%
(
flavour
,
)
syntax
=
"
%
s-"
rc
,
stdout
,
stderr
=
execute_command
(
syntax
%
(
info_cmd
,
name
),
module
)
...
...
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