Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Parametrized script #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ servernetmask: 255.255.255.0
servernet: 172.16.254.0
servergw: 172.16.254.1
serverfqdn: pdc.topolin.ia
wan0mode: dhcp
wan0ip: dhcp
wan0netmask: dhcp
wan0gateway: dhcp
domainshort: TOPOLIN
domainfull: topolin.ia
dhcprange_start: 172.16.254.10
Expand All @@ -29,3 +33,6 @@ mirror_host: it.archive.ubuntu.com
#mirror_security_path: /ubuntu
client_gitbranch: master
#client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
client_admin_username: bglug
client_admin_fullname: BGLUG User
client_admin_crypted_password: $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
9 changes: 2 additions & 7 deletions how_to_change_passwords.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,11 @@ Open up the file `roles/init/tasks/mgmtuser.yml`, find out `password:` and then

## *bglug* user (client side but preseeded) ##

The definition of password for *bglug* is inside `*.seed` files, inside [`server-config`][1]. Create a new password hash with:
Create a new password hash with:

$ mkpasswd -m sha-512

Copy the hash in your clipboard; clone the repository, then in the working directory:

$ find . -iname \*.seed -exec $EDITOR {} \;

Within each `*.seed` file, search for the string `user-password-crypted` string and change following hash.

Copy the hash after the colon of the option client_admin_crypted_password in `domain.yml`.
## *admin* user (domain valid) ##

Password must be specified within NethServer interface for the *admin* user and must be absolutely equal to the one contained inside vault file.
Expand Down
7 changes: 6 additions & 1 deletion roles/nethcfg/tasks/network.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
---
# Reconfiguring network interfaces

- name: Configuring external NIC
- name: Configuring external NIC (dhcp)
shell: /sbin/e-smith/db networks setprop {{ extnic }} role red bootproto dhcp
when: ansible_local.domain.wan0mode == "dhcp"

- name: Configuring external NIC (static)
shell: /sbin/e-smith/db networks setprop {{ extnic }} role red bootproto none ipaddr {{ ansible_local.domain.wan0ip}} netmask {{ ansible_local.domain.wan0netmask }} gateway {{ ansible_local.domain.wan0gateway }}
when: ansible_local.domain.wan0mode == "static"

- name: Configuring internal NIC
shell: /sbin/e-smith/db networks setprop {{ intnic }} role green ipaddr {{ ansible_local.domain.serverip }} netmask {{ ansible_local.domain.servernetmask }}
Expand Down
6 changes: 3 additions & 3 deletions roles/preseed/templates/preseed/aula-trusty.seed
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}

# User creation
d-i passwd/user-fullname string BgLUG User
d-i passwd/username string bglug
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
d-i passwd/user-fullname string {{ ansible_local.domain.client_admin_fullname }}
d-i passwd/username string {{ ansible_local.domain.client_admin_username }}
d-i passwd/user-password-crypted password {{ ansible_local.domain.client_admin_crypted_password }}

# Partitioning
d-i partman-auto/init_automatically_partition select biggest_free
Expand Down
6 changes: 3 additions & 3 deletions roles/preseed/templates/preseed/client-trusty.seed
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}

# User creation
d-i passwd/user-fullname string BgLUG User
d-i passwd/username string bglug
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
d-i passwd/user-fullname string {{ ansible_local.domain.client_admin_fullname }}
d-i passwd/username string {{ ansible_local.domain.client_admin_username }}
d-i passwd/user-password-crypted password {{ ansible_local.domain.client_admin_crypted_password }}

# Partitioning
d-i partman-auto/init_automatically_partition select biggest_free
Expand Down
6 changes: 3 additions & 3 deletions roles/preseed/templates/preseed/docenti-trusty.seed
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}

# User creation
d-i passwd/user-fullname string BgLUG User
d-i passwd/username string bglug
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
d-i passwd/user-fullname string {{ ansible_local.domain.client_admin_fullname }}
d-i passwd/username string {{ ansible_local.domain.client_admin_username }}
d-i passwd/user-password-crypted password {{ ansible_local.domain.client_admin_crypted_password }}

# Partitioning
d-i partman-auto/init_automatically_partition select biggest_free
Expand Down