Skip to content

Commit dd8e49e

Browse files
committed
Add bootstrap script and ensure vault pass cannot be copy/pasted
1 parent 9809fb5 commit dd8e49e

5 files changed

Lines changed: 59 additions & 27 deletions

File tree

ansible/.vaultpass.gpg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
� RWI0��d��Ґ�S#�|�ڳ��� ����cg��EQT�f�?��ݹCW���\�=܋�J�[% /�wrinOu�Ћ��*����X�
2+
��)�a�u]/г�5l\V.�p=�c񫙹z��3���\#i���{곕�NLi�QN�� ���׆q/�

ansible/ansible.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[defaults]
22
interpreter_python = /usr/bin/python3
3-
roles_path = roles
3+
roles_path = roles:../
44
vault_password_file = .vaultpass
55
pipelining = True
66
localhost_warning=False

ansible/bootstrap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
##
3+
# Basic list of commands needed to get this ansible formula running on a server.
4+
##
5+
set -e
6+
7+
# Services Repository Location
8+
basedir="${basedir:-/srv/ansible}"
9+
10+
# Prepare Host
11+
apt-get update
12+
apt-get upgrade -y
13+
14+
# Install Dependencies
15+
apt-get install -y git ansible-core
16+
17+
# Clone Repository
18+
if [ ! -d "$basedir" ]; then
19+
git clone -b release https://github.com/recoverysource/services "$basedir"
20+
fi
21+
22+
# Vault Pass
23+
read -s -p 'Provide decryption key for .vaultpass: ' pw
24+
echo "$pw" | gpg --batch --decrypt \
25+
"$basedir/ansible/.vaultpass.gpg" \
26+
-o "$basedir/ansible/.vaultpass"
27+
chmod 0600 "$basedir/ansible/.vaultpass"
28+
29+
# Initial configuration sync
30+
cd "$basedir/ansible/" && ansible-playbook maintenance.yml

ansible/group_vars/all/users.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
$ANSIBLE_VAULT;1.1;AES256
2-
63393666313830363662353230376637323363336230633237366330613438343761633233623236
3-
3364386139336661353064636135333231386331336430630a353764666537623935626638663831
4-
64666462626232393134363835663530643565366266386233636637313264636563366435333238
5-
3830623266663166630a643430383562666532636530356630386333313739346164306365323862
6-
62653362643763656531663039303939393038623765363832303831383937613161646531356135
7-
39346363313535376334303364326261343966663564623537663964633562653936663964353963
8-
37303666653263396334646635326363343763383461666564343239383137376130343439353935
9-
37623239613433326135376332313738336133316661316433313561633838373234303966663730
10-
33363539316235306130356338643165643330663663323233656133626639383235346533376437
11-
38343162363930656466346132346237616666373830393164326233323332303639373830663633
12-
39616639396438376433333636386130373938346465613239613865383130386236306262353565
13-
30323862386364396136336561666132363439323365353766356330626264303163316637613366
14-
62363837646535386166666237623364333433653733356461646130663562363662396537323636
15-
65613065326163666637393438613632623836646531316232666466316364303338663832626437
16-
65383331323762386535663763656432373135663562396463363062633766653765323061383036
17-
38333130376137323032393030613232333733313262616664366130653439643637633934613632
18-
36383239323036333230623038663435316533346464306163373865313266373065393964306339
19-
30383536323163316464383536326664636132373664353439656336333639303539326636356136
20-
31633737393430653831626565396332356435616232306339366136643331363539383332663636
21-
36616338386163316235343561623632356338623033623866656561666232393837313961313031
22-
36386332623161353132393333356565663030343130616436393434333337336131653266306430
23-
64613634613465366564623764333037333433663533653234383339656463383233643661613337
24-
63393364616264356531303531313365613863343131366538373537366662613866333437663134
25-
39383938653530316532653666653465383266343833356135636236333135636161376365646161
26-
3065
2+
31326430313230626661303062333739346662353261326533356464626565393038383734666639
3+
6536313130646638386633663031303833353632636461620a353431646537303937323639623864
4+
61633237306636343830383661313538383362663666336436323738386632613963363461383262
5+
6239303033353563300a666666303065326333656135386566373735646563306561326538363664
6+
61613166623963303062326439306239653436303938376234633865316435306434626430313530
7+
35323339343831363330316564356662613436613336376364393061663932316632346132323639
8+
61653639653733653839363031306266343534663532316631333236303238633732306333396339
9+
30366635393063303663313536623839363961633232656335643131326631326134613035333863
10+
63363865323966316138666230333632666232613130346537663661366263313962366366303263
11+
30383663333631626362323035626638393135326365663861326662633531643638663333346432
12+
38326635353438656134343362303234313536306539336139636566646531366163343535626538
13+
33616461363832346137363730613461343965383864366137346263666635353434636134663666
14+
35343761356161306138636562313236666330383339366261353066333134333563633137313139
15+
31393334376163313638313965323435626337363831376430353839633765326536633163306662
16+
66333838343836646231653236306437316238363338343830643638343136303931396530386233
17+
35316366353232643935396535656236636563313430643765383036643535306531363238303736
18+
32346538343937623132373066386539393335343939656331363535343966356166656561643031
19+
61373762326437333832626662626535666130316430393964616233633534636362396665303366
20+
30353636626535303039363333636434646231663261356363636131376266333036626438626234
21+
37396438666236303331343433653666343061376566616266393034303237356338363633633433
22+
36313935616337393162323835383133633635623536393439336265626630303238313761363534
23+
31333537376164653233353264333837653437316466613263373061643565653236656365653762
24+
62656130373766336530396265336537663330383838653064373035396165636634613835393939
25+
61376339356561386636663561346262373130353339626437623963363133313734643336333937
26+
3537

test/ansible.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[defaults]
22
interpreter_python = /usr/bin/python3
33
# Directory structure (FOR ./TEST)
4-
roles_path = ../ansible/roles
4+
roles_path = ../ansible/roles:../
55
localhost_warning=False
66

77
# SSH security

0 commit comments

Comments
 (0)