forked from LibreSchool/server-config
Reordered the tags defined within each role for the macro-role client-install. Splitted kickstart configuration from ansible-pull one. Reordered directories.
This commit is contained in:
parent
022b3325ec
commit
9cfb29bec4
@ -12,7 +12,7 @@ repositories.
|
||||
|
||||
### Quick start ###
|
||||
|
||||
You may proceed in using the files in this repo proceeding as follows:
|
||||
You may use this repo proceeding as follows:
|
||||
|
||||
$ vim hosts
|
||||
$ vim domain.yml
|
||||
@ -43,7 +43,6 @@ a *bridged* one.
|
||||
|
||||
### To Do List ###
|
||||
|
||||
* Splitting and finalize pxe roles (pxe + kickstart)
|
||||
* Implement backup
|
||||
* Detail physical installation procedure for the server machine within the
|
||||
Wiki.
|
||||
|
16
roles/ansible-pull/tasks/ansible-pull.yml
Normal file
16
roles/ansible-pull/tasks/ansible-pull.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Creazione directory per ansible-pull
|
||||
file: path=/var/lib/nethserver/ibay/ks/ansible-pull state=directory
|
||||
sudo: yes
|
||||
|
||||
- name: Template
|
||||
template: src={{ item }} dest=/var/lib/nethserver/ibay/ks/ansible-pull/{{ item }}
|
||||
with_items:
|
||||
- run.sh
|
||||
- getvaultpass.py
|
||||
- crontab
|
||||
sudo: yes
|
||||
|
||||
- name: Logrotate
|
||||
copy: src=logrotate dest=/var/lib/nethserver/ibay/ks/ansible-pull/logrotate
|
||||
sudo: yes
|
4
roles/ansible-pull/tasks/main.yml
Normal file
4
roles/ansible-pull/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
- include: ansible-pull.yml
|
||||
tags: ansible-pull
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
dependencies:
|
||||
- { role: pxe, tags: [ 'client-install', 'pxe' ] }
|
||||
- { role: kickstart, tags: [ 'client-install', 'kickstart', 'ks' ] }
|
||||
- { role: ubuntu-mirror, tags: [ 'client-install', 'ubuntu-mirror' ] }
|
||||
- { role: doraemon, tags: [ 'client-install', 'doraemon' ] }
|
||||
- { role: git-daemon, tags: [ 'client-install', 'git-daemon' ] }
|
||||
- { role: pxe, tags: [ 'client-install' ] }
|
||||
- { role: kickstart, tags: [ 'client-install' ] }
|
||||
- { role: ansible-pull, tags: [ 'client-install' ] }
|
||||
- { role: ubuntu-mirror, tags: [ 'client-install' ] }
|
||||
- { role: doraemon, tags: [ 'client-install' ] }
|
||||
- { role: git-daemon, tags: [ 'client-install' ] }
|
||||
|
@ -1,5 +1,3 @@
|
||||
---
|
||||
- include: doraemon.yml
|
||||
tags:
|
||||
- "client-install"
|
||||
- doraemon
|
||||
tags: doraemon
|
||||
|
@ -1,5 +1,3 @@
|
||||
---
|
||||
- include: git-daemon.yml
|
||||
tags:
|
||||
- client-install
|
||||
- git-daemon
|
||||
tags: git-daemon
|
||||
|
@ -49,15 +49,5 @@
|
||||
- ubuntu-trusty.cfg
|
||||
|
||||
- name: Copia configurazioni kickstart
|
||||
template: src=post-ks/{{ item }} dest=/var/lib/nethserver/ibay/ks/{{ item }}
|
||||
template: src=post-ks.sh dest=/var/lib/nethserver/ibay/ks/{{ item }}
|
||||
sudo: yes
|
||||
with_items:
|
||||
- post-ks.sh
|
||||
- getvaultpass.py
|
||||
- ansible-pull.sh
|
||||
- ansible-pull-crontab
|
||||
|
||||
- name: Copio logrotate per configurazione pull
|
||||
copy: src=ansible-pull-logrotate dest=/var/lib/nethserver/ibay/ks/ansible-pull-logrotate
|
||||
sudo: yes
|
||||
|
||||
|
@ -16,20 +16,20 @@ install -d -o root -g root /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
install -d -o root -g root /var/lib/{{ ansible_local.domain.domainfull }}/bin
|
||||
|
||||
# Installo lo script per la decrittazione della password del vault
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/getvaultpass.py -O /tmp/getvaultpass.py
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/getvaultpass.py -O /tmp/getvaultpass.py
|
||||
install -m744 -o root -g root /tmp/getvaultpass.py /var/lib/{{ ansible_local.domain.domainfull}}/bin/getvaultpass.py
|
||||
rm -f /tmp/getvaultpass.py
|
||||
|
||||
# Installo lo script per l'avvio di ansible-pull da root
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull.sh -O /tmp/ansible-pull.sh
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/run.sh -O /tmp/ansible-pull.sh
|
||||
install -m744 -o root -g root /tmp/ansible-pull.sh /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
||||
rm -f /tmp/ansible-pull.sh
|
||||
|
||||
# Installo il cronjob
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull-crontab -O /tmp/ansible-pull-crontab
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/crontab -O /tmp/ansible-pull-crontab
|
||||
install -m644 -o root -g root /tmp/ansible-pull-crontab /etc/cron.d/ansible-pull
|
||||
rm -f /tmp/ansible-pull-crontab
|
||||
# Installo il logrotate
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull-logrotate -O /tmp/ansible-pull-logrotate
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/logrotate -O /tmp/ansible-pull-logrotate
|
||||
install -m644 -o root -g root /tmp/ansible-pull-logrotate /etc/logrotate.d/ansible
|
||||
rm -f /tmp/ansible-pull-logrotate
|
@ -1,4 +1,3 @@
|
||||
---
|
||||
- include: pxe.yml
|
||||
tags:
|
||||
- "client-install"
|
||||
tags: pxe
|
||||
|
Loading…
x
Reference in New Issue
Block a user