Fix issue #27: try to honor domain.yml mirror_host variable.
This commit is contained in:
parent
4fc6036eae
commit
125c72e136
@ -8,5 +8,6 @@ mirror_security_host: security.ubuntu.com
|
||||
mirror_security_path: /ubuntu
|
||||
mirror_localpath: /ks/mirror
|
||||
execpath: ""
|
||||
execsecurepath: ""
|
||||
execmirrorpath: ""
|
||||
development: false
|
||||
|
@ -3,6 +3,7 @@
|
||||
- include: mirror-cfg.yml
|
||||
tags:
|
||||
- preseed
|
||||
- repoconfig
|
||||
|
||||
- include: preseed.yml
|
||||
tags:
|
||||
|
@ -6,19 +6,27 @@
|
||||
when: "ansible_local.domain.mirror_mode is defined"
|
||||
|
||||
- name: Determining mirror_host
|
||||
set_fact: mirror_host="{{ ansible_local.domain.mirror_host }}"
|
||||
set_fact:
|
||||
mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||
orig_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 }}"
|
||||
set_fact:
|
||||
mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||
orig_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 }}"
|
||||
set_fact:
|
||||
mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||
orig_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 }}"
|
||||
set_fact:
|
||||
mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||
orig_mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||
when: ansible_local.domain.mirror_security_path is defined
|
||||
|
||||
- name: Determining mirror_localpath
|
||||
@ -28,16 +36,13 @@
|
||||
# The remote option is already configured as it is.
|
||||
|
||||
# Configuring correctly local mirror
|
||||
- name: Determining variables for local and nfs mode
|
||||
- name: Altering paths
|
||||
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 }}"
|
||||
execmirrorpath: "{{ mirror_host }}{{ mirror_path }}"
|
||||
execsecurepath: "{{ mirror_security_host }}{{ mirror_security_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_path: "{{ mirror_localpath }}/{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||
mirror_security_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||
when: mirror_mode != 'remote'
|
||||
|
@ -1,18 +1,18 @@
|
||||
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
# Sources
|
||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
# Security
|
||||
deb http://{{ execpath }}{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ execpath }}{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||
deb http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||
|
||||
# Extras
|
||||
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
||||
|
Loading…
x
Reference in New Issue
Block a user