Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
edx
configuration
Commits
8c2b720f
Commit
8c2b720f
authored
Sep 29, 2014
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
automatic upgrades on image creation, enable unattended upgrades daily
parent
b506c6fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
1 deletions
+53
-1
playbooks/roles/security/defaults/main.yml
+10
-1
playbooks/roles/security/tasks/security-ubuntu.yml
+34
-0
playbooks/roles/security/templates/etc/apt/apt.conf.d/10periodic
+5
-0
playbooks/roles/security/templates/etc/apt/apt.conf.d/20unattended-upgrade
+4
-0
No files found.
playbooks/roles/security/defaults/main.yml
View file @
8c2b720f
...
...
@@ -15,11 +15,20 @@
# vars are namespace with the module name.
#
security_role_name
:
security
# set to true to enable unattended upgrades nightly
SECURITY_UNATTENDED_UPGRADES
:
false
# set to true to upgrade all packages nightly. false will only upgrade from security repo.
SECURITY_UPDATE_ALL_PACKAGES
:
false
# set to true to run aptitute safe-upgrade whenever ansible is run
SECURITY_UPGRADE_ON_ANSIBLE
:
false
#
# OS packages
#
security_debian_pkgs
:
[]
security_debian_pkgs
:
-
aptitude
-
unattended-upgrades
security_redhat_pkgs
:
[]
playbooks/roles/security/tasks/security-ubuntu.yml
View file @
8c2b720f
#### Enable periodic security updates
-
name
:
install security packages
apt
:
name={{item}} state=latest
with_items
:
security_debian_pkgs
-
name
:
update all system packages
apt
:
upgrade=safe
when
:
SECURITY_UPGRADE_ON_ANSIBLE
-
name
:
configure periodic unattended-upgrades
template
:
>
src=etc/apt/apt.conf.d/10periodic
dest=/etc/apt/apt.conf.d/10periodic
owner=root group=root mode=0644
when
:
SECURITY_UNATTENDED_UPGRADES
-
name
:
disable unattended-upgrades
file
:
path=/etc/apt/apt.conf.d/10periodic state=absent
when
:
not SECURITY_UNATTENDED_UPGRADES
-
name
:
only unattended-upgrade from security repo
template
:
>
src=etc/apt/apt.conf.d/20unattended-upgrade
dest=/etc/apt/apt.conf.d/20unattended-upgrade
owner=root group=root mode=0644
when
:
SECURITY_UNATTENDED_UPGRADES and not SECURITY_UPDATE_ALL_PACKAGES
-
name
:
disable security only updates on unattended-upgrades
file
:
path=/etc/apt/apt.conf.d/20unattended-upgrade state=absent
when
:
SECURITY_UPDATE_ALL_PACKAGES or not SECURITY_UNATTENDED_UPGRADES
#### Bash security vulnerability
-
name
:
Check if we are vulnerable
...
...
playbooks/roles/security/templates/etc/apt/apt.conf.d/10periodic
0 → 100644
View file @
8c2b720f
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
playbooks/roles/security/templates/etc/apt/apt.conf.d/20unattended-upgrade
0 → 100644
View file @
8c2b720f
Unattended-Upgrade::Allowed-Origins {
"${distro_id} ${distro_codename}-security";
};
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