Refactoring mirror_mode.
This commit is contained in:
parent
83b78a5c6f
commit
714ec47f9c
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
# Defaults for installation
|
||||||
|
mirror_mode: local
|
||||||
|
mirror_host: archive.ubuntu.com
|
||||||
|
mirror_path: /ubuntu
|
||||||
|
mirror_security_host: security.ubuntu.com
|
||||||
|
mirror_security_path: /ubuntu
|
||||||
|
mirror_localpath: /ks/mirror
|
||||||
|
execpath: ""
|
||||||
execmirrorpath: ""
|
execmirrorpath: ""
|
||||||
remote_mirror: archive.ubuntu.com
|
|
||||||
remote_mirrorpath: /ubuntu
|
|
||||||
remote_security_mirror: security.ubuntu.com
|
|
||||||
remote_security_mirrorpath: /ubuntu
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- include: mirror-cfg.yml
|
||||||
|
tags:
|
||||||
|
- preseed
|
||||||
|
|
||||||
- include: preseed.yml
|
- include: preseed.yml
|
||||||
tags:
|
tags:
|
||||||
- preseed
|
- preseed
|
||||||
|
43
roles/preseed/tasks/mirror-cfg.yml
Normal file
43
roles/preseed/tasks/mirror-cfg.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
# Determining other variables to be used inside templates
|
||||||
|
|
||||||
|
- name: Determining mirror_mode
|
||||||
|
set_fact: mirror_mode="{{ ansible_local.domain.mirror_mode }}"
|
||||||
|
when: "ansible_local.domain.mirror_mode is defined"
|
||||||
|
|
||||||
|
- name: Determining mirror_host
|
||||||
|
set_fact: mirror_host="{{ ansible_local.domain.mirror_host }}"
|
||||||
|
when: ansible_local.domain.mirror_host is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_path
|
||||||
|
set_fact: mirror_path="{{ ansible_local.domain.mirror_path }}"
|
||||||
|
when: ansible_local.domain.mirror_path is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_security_host
|
||||||
|
set_fact: mirror_security_host="{{ ansible_local.domain.mirror_security_host }}"
|
||||||
|
when: ansible_local.domain.mirror_security_host is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_security_path
|
||||||
|
set_fact: mirror_security_path="{{ ansible_local.domain.mirror_security_path }}"
|
||||||
|
when: ansible_local.domain.mirror_security_path is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_localpath
|
||||||
|
set_fact: mirror_localpath="{{ ansible_local.domain.mirror_localpath }}"
|
||||||
|
when: ansible_local.domain.mirror_localpath is defined
|
||||||
|
|
||||||
|
# The remote option is already configured as it is.
|
||||||
|
|
||||||
|
# Configuring correctly local mirror
|
||||||
|
- name: Determining variables for local and nfs mode
|
||||||
|
set_fact:
|
||||||
|
orig_mirror_path: ”{{ mirror_path }}"
|
||||||
|
orig_mirror_host: "{{ mirror_host }}"
|
||||||
|
orig_mirror_security_path: "{{ mirror_security_path }}"
|
||||||
|
orig_mirror_security_host: "{{ mirror_security_host }}"
|
||||||
|
execmirrorpath: ”{{ mirror_host }}{{ mirror_path }}"
|
||||||
|
execpath: "{{ ansible_local.domain.serverfqdn }}{{ mirror_localpath }}/"
|
||||||
|
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
||||||
|
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||||
|
mirror_security_path: "{{ mirror_localpath }}/{{ mirror_security_host }}{{mirror_security_path }}"
|
||||||
|
mirror_security_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||||
|
when: mirror_mode != 'remote'
|
@ -1,18 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Configuring executive mirror path
|
|
||||||
set_fact:
|
|
||||||
execmirrorpath: "{{ ansible_local.domain.mirrorpath }}"
|
|
||||||
when: ansible_local.domain.mirror_mode == 'nfs' or ansible_local.domain.mirror_mode == 'local'
|
|
||||||
|
|
||||||
- name: Overriding remote_mirror with defaults from domain.yml
|
|
||||||
set_fact:
|
|
||||||
remote_mirror: "{{ ansible_local.domain.remote_mirror }}"
|
|
||||||
when: ansible_local.domain.remote_mirror is defined
|
|
||||||
|
|
||||||
- name: Overriding remote_mirrorpath with defaults from domain.yml
|
|
||||||
set_fact:
|
|
||||||
remote_mirror: "{{ ansible_local.domain.remote_mirrorpath }}"
|
|
||||||
when: ansible_local.domain.remote_mirrorpath is defined
|
|
||||||
|
|
||||||
- name: Verifica configurazione ibay preseed
|
- name: Verifica configurazione ibay preseed
|
||||||
shell: /sbin/e-smith/db accounts show ks
|
shell: /sbin/e-smith/db accounts show ks
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
deb http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
deb http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
# deb-src http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
# deb-src http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
deb http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
deb http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
deb-src http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
deb-src http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
|
@ -21,13 +21,8 @@ d-i hw-detect/load_firmware boolean true
|
|||||||
# Setting up repositories from local mirror
|
# Setting up repositories from local mirror
|
||||||
d-i mirror/country string manual
|
d-i mirror/country string manual
|
||||||
d-i mirror/protocol string http
|
d-i mirror/protocol string http
|
||||||
{% if execmirrorpath != '' %}
|
d-i mirror/http/hostname string {{ mirror_host }}
|
||||||
d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }}
|
d-i mirror/http/directory string {{ mirror_path }}
|
||||||
d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu
|
|
||||||
{% else %}
|
|
||||||
d-i mirror/http/hostname string {{ remote_mirror }}
|
|
||||||
d-i mirror/http/directory string {{ remote_mirrorpath }}
|
|
||||||
{% endif %}
|
|
||||||
d-i mirror/http/proxy string
|
d-i mirror/http/proxy string
|
||||||
d-i mirror/suite string trusty
|
d-i mirror/suite string trusty
|
||||||
|
|
||||||
@ -39,21 +34,16 @@ d-i apt-setup/backports boolean true
|
|||||||
d-i apt-setup/non-free boolean true
|
d-i apt-setup/non-free boolean true
|
||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
d-i apt-setup/services-select multiselect security, updates
|
d-i apt-setup/services-select multiselect security, updates
|
||||||
{% if execmirrorpath != '' %}
|
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||||
d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }}
|
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||||
d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu
|
|
||||||
{% else %}
|
|
||||||
d-i apt-setup/security_host string {{ remote_security_mirror }}
|
|
||||||
d-i apt-setup/security_path string {{ remote_security_mirrorpath }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Setup and enable libreoffice PPA
|
# Setup and enable libreoffice PPA
|
||||||
d-i apt-setup/local0/repository string http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||||
|
|
||||||
# Setup and enable ansible PPA
|
# Setup and enable ansible PPA
|
||||||
d-i apt-setup/local1/repository string http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||||
|
|
||||||
|
@ -21,13 +21,8 @@ d-i hw-detect/load_firmware boolean true
|
|||||||
# Setting up repositories from local mirror
|
# Setting up repositories from local mirror
|
||||||
d-i mirror/country string manual
|
d-i mirror/country string manual
|
||||||
d-i mirror/protocol string http
|
d-i mirror/protocol string http
|
||||||
{% if execmirrorpath != '' %}
|
d-i mirror/http/hostname string {{ mirror_host }}
|
||||||
d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }}
|
d-i mirror/http/directory string {{ mirror_path }}
|
||||||
d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu
|
|
||||||
{% else %}
|
|
||||||
d-i mirror/http/hostname string {{ remote_mirror }}
|
|
||||||
d-i mirror/http/directory string {{ remote_mirrorpath }}
|
|
||||||
{% endif %}
|
|
||||||
d-i mirror/http/proxy string
|
d-i mirror/http/proxy string
|
||||||
d-i mirror/suite string trusty
|
d-i mirror/suite string trusty
|
||||||
|
|
||||||
@ -39,21 +34,16 @@ d-i apt-setup/backports boolean true
|
|||||||
d-i apt-setup/non-free boolean true
|
d-i apt-setup/non-free boolean true
|
||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
d-i apt-setup/services-select multiselect security, updates
|
d-i apt-setup/services-select multiselect security, updates
|
||||||
{% if execmirrorpath != '' %}
|
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||||
d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }}
|
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||||
d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu
|
|
||||||
{% else %}
|
|
||||||
d-i apt-setup/security_host string {{ remote_security_mirror }}
|
|
||||||
d-i apt-setup/security_path string {{ remote_security_mirrorpath }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Setup and enable libreoffice PPA
|
# Setup and enable libreoffice PPA
|
||||||
d-i apt-setup/local0/repository string http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||||
|
|
||||||
# Setup and enable ansible PPA
|
# Setup and enable ansible PPA
|
||||||
d-i apt-setup/local1/repository string http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||||
|
|
||||||
|
@ -22,13 +22,8 @@ d-i hw-detect/load_firmware boolean true
|
|||||||
# Setting up repositories from local mirror
|
# Setting up repositories from local mirror
|
||||||
d-i mirror/country string manual
|
d-i mirror/country string manual
|
||||||
d-i mirror/protocol string http
|
d-i mirror/protocol string http
|
||||||
{% if execmirrorpath != '' %}
|
d-i mirror/http/hostname string {{ mirror_host }}
|
||||||
d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }}
|
d-i mirror/http/directory string {{ mirror_path }}
|
||||||
d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu
|
|
||||||
{% else %}
|
|
||||||
d-i mirror/http/hostname string {{ remote_mirror }}
|
|
||||||
d-i mirror/http/directory string {{ remote_mirrorpath }}
|
|
||||||
{% endif %}
|
|
||||||
d-i mirror/http/proxy string
|
d-i mirror/http/proxy string
|
||||||
d-i mirror/suite string trusty
|
d-i mirror/suite string trusty
|
||||||
|
|
||||||
@ -40,21 +35,16 @@ d-i apt-setup/backports boolean true
|
|||||||
d-i apt-setup/non-free boolean true
|
d-i apt-setup/non-free boolean true
|
||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
d-i apt-setup/services-select multiselect security, updates
|
d-i apt-setup/services-select multiselect security, updates
|
||||||
{% if execmirrorpath != '' %}
|
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||||
d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }}
|
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||||
d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu
|
|
||||||
{% else %}
|
|
||||||
d-i apt-setup/security_host string {{ remote_security_mirror }}
|
|
||||||
d-i apt-setup/security_path string {{ remote_security_mirrorpath }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Setup and enable libreoffice PPA
|
# Setup and enable libreoffice PPA
|
||||||
d-i apt-setup/local0/repository string http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||||
|
|
||||||
# Setup and enable ansible PPA
|
# Setup and enable ansible PPA
|
||||||
d-i apt-setup/local1/repository string http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||||
|
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
---
|
---
|
||||||
execmirrorpath: ""
|
# Defaults for installation
|
||||||
|
host: archive.ubuntu.com
|
||||||
|
path: /ubuntu
|
||||||
|
shost: security.ubuntu.com
|
||||||
|
spath: /ubuntu
|
||||||
|
@ -1,88 +0,0 @@
|
|||||||
############# config ##################
|
|
||||||
#
|
|
||||||
# set base_path /var/spool/apt-mirror
|
|
||||||
#
|
|
||||||
# set mirror_path $base_path/mirror
|
|
||||||
# set skel_path $base_path/skel
|
|
||||||
# set var_path $base_path/var
|
|
||||||
# set cleanscript $var_path/clean.sh
|
|
||||||
# set defaultarch <running host architecture>
|
|
||||||
# set postmirror_script $var_path/postmirror.sh
|
|
||||||
# set run_postmirror 0
|
|
||||||
set nthreads 20
|
|
||||||
set _tilde 0
|
|
||||||
#set limit_rate 200k
|
|
||||||
#
|
|
||||||
############# end config ##############
|
|
||||||
|
|
||||||
#
|
|
||||||
# 14.04 LTS - Trusty Tahr
|
|
||||||
#
|
|
||||||
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
|
||||||
deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
|
||||||
deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
|
||||||
deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
|
|
||||||
deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
|
|
||||||
deb-i386 http://extras.ubuntu.com/ubuntu trusty main
|
|
||||||
deb-amd64 http://extras.ubuntu.com/ubuntu trusty main
|
|
||||||
deb-src http://extras.ubuntu.com/ubuntu trusty main
|
|
||||||
|
|
||||||
deb-i386 http://archive.canonical.com/ trusty partner
|
|
||||||
deb-i386 http://archive.canonical.com/ trusty-proposed partner
|
|
||||||
|
|
||||||
deb-amd64 http://archive.canonical.com/ trusty partner
|
|
||||||
deb-amd64 http://archive.canonical.com/ trusty-proposed partner
|
|
||||||
|
|
||||||
deb-i386 http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
|
||||||
deb-i386 http://security.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-amd64 http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
|
||||||
deb-amd64 http://security.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
|
||||||
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
|
||||||
|
|
||||||
# Ansible
|
|
||||||
deb-i386 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
|
||||||
deb-amd64 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
|
||||||
|
|
||||||
# LibreOffice PPA
|
|
||||||
deb-i386 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
|
||||||
deb-amd64 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
|
||||||
deb-src http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
|
||||||
|
|
||||||
# sys42
|
|
||||||
deb-i386 http://bglug.sys42.eu/ubuntu trusty main
|
|
||||||
deb-amd64 http://bglug.sys42.eu/ubuntu trusty main
|
|
||||||
deb-src http://bglug.sys42.eu/ubuntu trusty main
|
|
||||||
|
|
||||||
clean http://archive.ubuntu.com/ubuntu
|
|
||||||
clean http://extras.ubuntu.com/ubuntu
|
|
||||||
clean http://archive.canonical.com
|
|
||||||
clean http://security.ubuntu.com/ubuntu
|
|
||||||
clean http://ppa.launchpad.net/ansible/ansible/ubuntu
|
|
||||||
clean http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu
|
|
||||||
clean http://bglug.sys42.eu/ubuntu
|
|
@ -8,7 +8,7 @@
|
|||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Installazione configurazione apt-mirror
|
- name: Installazione configurazione apt-mirror
|
||||||
copy:
|
template:
|
||||||
src: apt-mirror.list
|
src: apt-mirror.list
|
||||||
dest: /etc/apt-mirror.list
|
dest: /etc/apt-mirror.list
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Configuring executive mirrorpath
|
- include: mirror-cfg.yml
|
||||||
set_fact:
|
tags:
|
||||||
execmirrorpath: "{{ ansible_local.domain.mirrorpath }}"
|
- mirror
|
||||||
when: ansible_local.domain.mirror_mode == 'local' or ansible_local.domain.mirror_mode == 'nfs'
|
|
||||||
|
|
||||||
- include: local-mirror.yml
|
- include: local-mirror.yml
|
||||||
when: ansible_local.domain.mirror_mode == 'local'
|
when: ansible_local.domain.mirror_mode == 'local'
|
||||||
|
19
roles/ubuntu-mirror/tasks/mirror-cfg.yml
Normal file
19
roles/ubuntu-mirror/tasks/mirror-cfg.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
# Determining other variables to be used inside templates
|
||||||
|
|
||||||
|
- name: Determining mirror_host
|
||||||
|
set_fact: host="{{ ansible_local.domain.mirror_host }}"
|
||||||
|
when: ansible_local.domain.mirror_host is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_path
|
||||||
|
set_fact: path="{{ ansible_local.domain.mirror_path }}"
|
||||||
|
when: ansible_local.domain.mirror_path is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_security_host
|
||||||
|
set_fact: shost="{{ ansible_local.domain.mirror_security_host }}"
|
||||||
|
when: ansible_local.domain.mirror_security_host is defined
|
||||||
|
|
||||||
|
- name: Determining mirror_security_path
|
||||||
|
set_fact: spath="{{ ansible_local.domain.mirror_security_path }}"
|
||||||
|
when: ansible_local.domain.mirror_security_path is defined
|
||||||
|
|
88
roles/ubuntu-mirror/templates/apt-mirror.list
Normal file
88
roles/ubuntu-mirror/templates/apt-mirror.list
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
############# config ##################
|
||||||
|
#
|
||||||
|
# set base_path /var/spool/apt-mirror
|
||||||
|
#
|
||||||
|
# set path $base_path/mirror
|
||||||
|
# set skel_path $base_path/skel
|
||||||
|
# set var_path $base_path/var
|
||||||
|
# set cleanscript $var_path/clean.sh
|
||||||
|
# set defaultarch <running host architecture>
|
||||||
|
# set postmirror_script $var_path/postmirror.sh
|
||||||
|
# set run_postmirror 0
|
||||||
|
set nthreads 20
|
||||||
|
set _tilde 0
|
||||||
|
#set limit_rate 200k
|
||||||
|
#
|
||||||
|
############# end config ##############
|
||||||
|
|
||||||
|
#
|
||||||
|
# 14.04 LTS - Trusty Tahr
|
||||||
|
#
|
||||||
|
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-proposed main restricted universe multiverse
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||||
|
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-proposed main restricted universe multiverse
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||||
|
|
||||||
|
deb-src http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||||
|
deb-src http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||||
|
deb-src http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||||
|
deb-src http://{{ host }}{{ path }} trusty-proposed main restricted universe multiverse
|
||||||
|
deb-src http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||||
|
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-i386 http://{{ host }}{{ path }} trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-amd64 http://{{ host }}{{ path }} trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
|
||||||
|
deb-i386 http://extras.ubuntu.com/ubuntu trusty main
|
||||||
|
deb-amd64 http://extras.ubuntu.com/ubuntu trusty main
|
||||||
|
deb-src http://extras.ubuntu.com/ubuntu trusty main
|
||||||
|
|
||||||
|
deb-i386 http://archive.canonical.com/ trusty partner
|
||||||
|
deb-i386 http://archive.canonical.com/ trusty-proposed partner
|
||||||
|
|
||||||
|
deb-amd64 http://archive.canonical.com/ trusty partner
|
||||||
|
deb-amd64 http://archive.canonical.com/ trusty-proposed partner
|
||||||
|
|
||||||
|
deb-i386 http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||||
|
deb-i386 http://{{ shost }}{{ spath }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-amd64 http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||||
|
deb-amd64 http://{{ shost }}{{ spath }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||||
|
deb-src http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||||
|
|
||||||
|
# Ansible
|
||||||
|
deb-i386 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
|
deb-amd64 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||||
|
|
||||||
|
# LibreOffice PPA
|
||||||
|
deb-i386 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
|
deb-amd64 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
|
deb-src http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||||
|
|
||||||
|
# sys42
|
||||||
|
deb-i386 http://bglug.sys42.eu/ubuntu trusty main
|
||||||
|
deb-amd64 http://bglug.sys42.eu/ubuntu trusty main
|
||||||
|
deb-src http://bglug.sys42.eu/ubuntu trusty main
|
||||||
|
|
||||||
|
clean http://{{ host }}{{ path }}
|
||||||
|
clean http://extras.ubuntu.com/ubuntu
|
||||||
|
clean http://archive.canonical.com
|
||||||
|
clean http://{{ shost }}{{ spath }}
|
||||||
|
clean http://ppa.launchpad.net/ansible/ansible/ubuntu
|
||||||
|
clean http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu
|
||||||
|
clean http://bglug.sys42.eu/ubuntu
|
Loading…
x
Reference in New Issue
Block a user