Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ansible-prerequirements
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
agowa338-ansible
ansible-prerequirements
Commits
818f21d4
Commit
818f21d4
authored
4 years ago
by
Klaus Frank
Browse files
Options
Downloads
Patches
Plain Diff
Add ubuntu
parent
c3254df3
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+1
-3
1 addition, 3 deletions
defaults/main.yml
tasks/main.yml
+34
-8
34 additions, 8 deletions
tasks/main.yml
vars/.gitkeep.yml
+0
-0
0 additions, 0 deletions
vars/.gitkeep.yml
vars/main.yml
+7
-0
7 additions, 0 deletions
vars/main.yml
with
42 additions
and
11 deletions
defaults/main.yml
+
1
−
3
View file @
818f21d4
ansible_prerequirements_packages
:
minimal_ansible_version
:
2.10.2
-
python
-
lsb-release
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
34
−
8
View file @
818f21d4
-
name
:
PREREQUIREMENTS | Update package index
-
name
:
"
Check
local
ansible
version
>=
{{
minimal_ansible_version
}}"
raw
:
pacman -Sy
delegate_to
:
localhost
register
:
command_res
vars
:
ansible_connection
:
local
run_once
:
true
assert
:
msg
:
"
Ansible
must
be
{{
minimal_ansible_version
}}
or
higher"
that
:
-
ansible_version.string is version(minimal_ansible_version, ">=")
-
name
:
PREREQUIREMENTS | Get os-release
raw
:
cat /etc/os-release
register
:
os_release
changed_when
:
false
changed_when
:
false
-
name
:
PREREQUIREMENTS | Install packages
-
name
:
PREREQUIREMENTS | ArchLinux
raw
:
pacman --needed --noconfirm -S {{ item }}
when
:
os_release.stdout.find("ID=arch") != -1
with_items
:
'
{{
ansible_prerequirements_packages
}}'
block
:
register
:
command_res
-
name
:
PREREQUIREMENTS | Update package index (pacman)
changed_when
:
"
'there
is
nothing
to
do'
not
in
command_res.stdout"
raw
:
pacman -Sy
changed_when
:
false
-
name
:
PREREQUIREMENTS | Install packages (pacman)
raw
:
pacman --needed --noconfirm -S {{ archlinux_prerequirements_packages|join(" ") }}
register
:
command_res
changed_when
:
command_res.stdout.find('there is nothing to do') == -1
-
name
:
PREREQUIREMENTS | Ubuntu
when
:
os_release.stdout.find("ID=ubuntu")
block
:
-
name
:
PREREQUIREMENTS | Update package index (apt)
raw
:
apt update
changed_when
:
false
-
name
:
PREREQUIREMENTS | Install packages (apt)
raw
:
apt install -y {{ ubuntu_prerequirements_packages|join(" ") }}
register
:
command_res
changed_when
:
command_res.stdout.find('0 upgraded, 0 newly installed, 0 to remove and ') == -1
-
name
:
PREREQUIREMENTS | Gather facts
-
name
:
PREREQUIREMENTS | Gather facts
setup
:
null
setup
:
null
...
...
This diff is collapsed.
Click to expand it.
vars/.gitkeep.yml
deleted
100644 → 0
+
0
−
0
View file @
c3254df3
This diff is collapsed.
Click to expand it.
vars/main.yml
0 → 100644
+
7
−
0
View file @
818f21d4
archlinux_prerequirements_packages
:
-
python
-
lsb-release
ubuntu_prerequirements_packages
:
-
python3
-
lsb-release
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