Changeset - babda105c9cf
[Not reviewed]
0 2 1
Branko Majic (branko) - 9 years ago 2015-08-16 22:38:56
branko@majic.rs
MAR-16: Added option to common role for setting-up caching proxy for apt.
3 files changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -197,6 +197,7 @@ hardening across all servers, no matter what services they provide.
 

	
 
The role implements the following:
 

	
 
* Configures apt to use caching proxy (if any was specified).
 
* Sets-up umask for all logins to ``0027``.
 
* Installs sudo.
 
* Installs additional base packages, as configured.
 
@@ -220,6 +221,10 @@ The role implements the following:
 
Parameters
 
~~~~~~~~~~
 

	
 
**apt_proxy** (string, optional)
 
  URI of a caching proxy that should be used when retrieving the packages via
 
  apt. Default is no proxy.
 

	
 
**os_users** (list, optional)
 
  A list of operating system users that should be set-up on a server. Each item
 
  is a dictionary with the following options describing the user parameters:
roles/common/tasks/main.yml
Show inline comments
 
---
 

	
 
- name: Enable use of proxy for retrieving system packages via apt
 
  template: src="apt_proxy.j2" dest="/etc/apt/apt.conf.d/00proxy"
 
            owner=root group=root mode=644
 
  when: apt_proxy is defined
 

	
 
- name: Disable use of proxy for retrieving system packages via apt
 
  file: path="/etc/apt/apt.conf.d/00proxy" state=absent
 
  when: apt_proxy is undefined
 

	
 
- name: Deploy pam-auth-update configuration file for enabling pam_umask
 
  copy: src=pam_umask dest=/usr/share/pam-configs/umask mode=644 owner=root group=root
 
  notify: Update PAM configuration
roles/common/templates/apt_proxy.j2
Show inline comments
 
new file 100644
 
Acquire::http::Proxy "{{ apt_proxy }}";
0 comments (0 inline, 0 general)