Merge pull request #33 from syntaxerrormmm/salerno3.ilariaalpi
Salerno3.ilariaalpi: realigning repo and prod code
This commit is contained in:
commit
d4641b2fd6
2
hosts
2
hosts
@ -2,4 +2,4 @@
|
|||||||
host_key_checking=false
|
host_key_checking=false
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
192.168.5.1 ansible_ssh_user=amgmt
|
172.16.99.22 ansible_ssh_user=amgmt
|
@ -1,14 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Fixing base variables.
|
||||||
|
basedir=/var/lib/{{ ansible_local.domain.domainfull }}
|
||||||
|
url=git://{{ ansible_local.domain.serverfqdn }}/client-pull-installation.git
|
||||||
|
branch={{ ansible_local.domain.client_gitbranch }}
|
||||||
|
|
||||||
# Creo directory dipendenti
|
# Creo directory dipendenti
|
||||||
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
||||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/bin
|
/usr/bin/install -d -o root -g users ${basedir}/bin
|
||||||
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
|
||||||
|
# Workaround issue #23 - ansible-pull won't pull out of remote the first time.
|
||||||
|
if [[ ! -f ${basedir}/config/local.yml ]]; then
|
||||||
|
/usr/bin/git clone -b ${branch} ${url} ${basedir}/config
|
||||||
|
fi
|
||||||
|
|
||||||
# Installo ansible-pull.sh
|
# Installo ansible-pull.sh
|
||||||
echo "$(date --rfc-3339=seconds) Creating ansible-pull.sh."
|
echo "$(date --rfc-3339=seconds) Creating ansible-pull.sh."
|
||||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O ${basedir}/bin/ansible-pull.sh
|
||||||
chmod a+x /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
chmod a+x ${basedir}/bin/ansible-pull.sh
|
||||||
|
|
||||||
|
# Fixing permissions on the main directory
|
||||||
|
/bin/chown -R root:users ${basedir}
|
||||||
|
|
||||||
# Installo il cronjob per ansible-pull
|
# Installo il cronjob per ansible-pull
|
||||||
echo "$(date --rfc-3339=seconds) Creating crontab"
|
echo "$(date --rfc-3339=seconds) Creating crontab"
|
||||||
|
@ -8,5 +8,6 @@ mirror_security_host: security.ubuntu.com
|
|||||||
mirror_security_path: /ubuntu
|
mirror_security_path: /ubuntu
|
||||||
mirror_localpath: /ks/mirror
|
mirror_localpath: /ks/mirror
|
||||||
execpath: ""
|
execpath: ""
|
||||||
|
execsecurepath: ""
|
||||||
execmirrorpath: ""
|
execmirrorpath: ""
|
||||||
development: false
|
development: false
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
- include: mirror-cfg.yml
|
- include: mirror-cfg.yml
|
||||||
tags:
|
tags:
|
||||||
- preseed
|
- preseed
|
||||||
|
- repoconfig
|
||||||
|
|
||||||
- include: preseed.yml
|
- include: preseed.yml
|
||||||
tags:
|
tags:
|
||||||
|
@ -6,19 +6,27 @@
|
|||||||
when: "ansible_local.domain.mirror_mode is defined"
|
when: "ansible_local.domain.mirror_mode is defined"
|
||||||
|
|
||||||
- name: Determining mirror_host
|
- 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
|
when: ansible_local.domain.mirror_host is defined
|
||||||
|
|
||||||
- name: Determining mirror_path
|
- 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
|
when: ansible_local.domain.mirror_path is defined
|
||||||
|
|
||||||
- name: Determining mirror_security_host
|
- 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
|
when: ansible_local.domain.mirror_security_host is defined
|
||||||
|
|
||||||
- name: Determining mirror_security_path
|
- 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
|
when: ansible_local.domain.mirror_security_path is defined
|
||||||
|
|
||||||
- name: Determining mirror_localpath
|
- name: Determining mirror_localpath
|
||||||
@ -28,13 +36,10 @@
|
|||||||
# The remote option is already configured as it is.
|
# The remote option is already configured as it is.
|
||||||
|
|
||||||
# Configuring correctly local mirror
|
# Configuring correctly local mirror
|
||||||
- name: Determining variables for local and nfs mode
|
- name: Altering paths
|
||||||
set_fact:
|
set_fact:
|
||||||
orig_mirror_path: ”{{ mirror_path }}"
|
execmirrorpath: "{{ mirror_host }}{{ mirror_path }}"
|
||||||
orig_mirror_host: "{{ mirror_host }}"
|
execsecurepath: "{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||||
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 }}/"
|
execpath: "{{ ansible_local.domain.serverfqdn }}{{ mirror_localpath }}/"
|
||||||
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
||||||
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_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-backports main restricted universe multiverse
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_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-backports main restricted universe multiverse
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
deb 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://{{ execpath }}{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
#deb-src http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||||
|
|
||||||
# Extras
|
# Extras
|
||||||
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
||||||
|
Loading…
x
Reference in New Issue
Block a user