File tree Expand file tree Collapse file tree 4 files changed +4
-46
lines changed
inventories/development/group_vars Expand file tree Collapse file tree 4 files changed +4
-46
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ To run a playbook you should do:
3636
3737``` bash
3838ansible-playbook \
39- --ask-vault-pass \
4039 --become \
4140 --inventory=inventories/< INVENTORY> \
4241 --user=ubuntu \
@@ -47,27 +46,8 @@ OR to run all provisioning playbooks with the development inventory (most common
4746
4847``` bash
4948ansible-playbook \
50- --ask-vault-pass \
5149 --become \
5250 --inventory=inventories/development \
5351 --user=ubuntu \
5452 playbooks/provision.yml
5553```
56-
57- ### Vault
58-
59- The vault password required for running the playbooks can be found in the ` database.kdbx ` KeePass file.
60-
61- To encrypt a new secret with vault run:
62-
63- ``` bash
64- echo -n ' <YOUR SECRET>' | ansible-vault encrypt_string
65- ```
66-
67- > The __ New password__ is the original Ansible Vault password.
68-
69- ## Keepass
70-
71- Copies of all the passwords used here are kept in the encrypted ` database.kdbx ` file.
72-
73- > Please ask your admin for the decryption password.
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ sudoers:
3434 key : ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDNh4PK3dE8ZOEbD+CZSisHl8R0r7aAcFL48tW10Kv+EcuTlAH3Du6bHh2OrGgU9XC933WDbyUcB0N+T+wv9XJudVWE6708JoSflbW93nCiOojq+GkpbiCXHkTwvbV2MLtKOUCQQFD65umZ5/p568vpay6bWUfsFso/PjJ1zIktW9EYuK83mGU0C+F74nDZfmwc3CB1N8u6fgviFANfPZvE//If09MU6jMaSGc5umX2tIfH0n/OEal3jNsJgXu+5irUupJ56I39d4Zym+4DbaShsoXUz9PMvnlXd194aswJlEwlxcW4/lmq3IbW62kvMFf3UePTK6O4piE1Ci2XHlxnEUOzIz5FAnktd9FtDsGxynAVlvdLA93TJXwQ6FGtTQAuIWGXukOWwT11IATj+CSuhOOvsa/VAG2NZKsxlCex3F6V0FKmPir7OZXzLXkEMaW8UgKpGqZ6oaRY1pGOWIzuqyqP50Fakc+X+tV8QzKJN8TQu1A/RSvVX0DKOAYTC0M=
3535
3636docker_users :
37+ - name : Default user
38+ username : ubuntu
39+ state : present
3740 - name : bradford.sawadye@jembi.org
3841 username : bradfordsawadye
3942 state : present
@@ -72,14 +75,3 @@ firewall_subnet_restriction: "10.1.10.0/16"
7275# docker_swarm_hostname_1: ip-172-31-36-41
7376# docker_swarm_hostname_2: ip-172-31-35-12
7477# docker_swarm_hostname_3: ip-172-31-38-234
75-
76- # Credentials for logging in to docker hub
77- docker_username : ethiopiacdrbot
78- docker_email : ryan+ethiopiacdrbot@jembi.org
79- docker_password : !vault |
80- $ANSIBLE_VAULT;1.1;AES256
81- 34323064326163323965306565316239366335633632633862333339323965633539376162623138
82- 3166356333333635656337383236306535343164636632640a323031326166653339663162663763
83- 39356130373863326163306139343332396262353036333532303530383363376237336138336136
84- 3262303664386464380a613834373538376639373330363361396165333533343137613464653761
85- 36383536633362653535343666333731333630383639613065393935346336613636
Original file line number Diff line number Diff line change 3131 comment : " {{ item.name }}"
3232 state : " {{ item.state }}"
3333 loop : " {{ sudoers + docker_users }}"
34+ when : item.key is defined
3435
3536- name : disable root login
3637 lineinfile :
Original file line number Diff line number Diff line change 6161 name : docker
6262 state : reloaded
6363
64- - name : adding existing user ubuntu to group sudo
65- user :
66- name : ubuntu
67- groups :
68- - docker
69- append : yes
70-
7164- name : Add user to docker group
7265 user :
7366 name : " {{ item.username }}"
7972- name : reset ssh connection to allow user changes to affect ansible user
8073 meta : reset_connection
8174
82- - name : log in to docker hub using ubuntu user
83- become : yes
84- become_user : ubuntu
85- docker_login :
86- username : ' {{ docker_username }}'
87- password : ' {{ docker_password }}'
88- state : present
89-
9075- name : create docker daemon config path if it doesn't exist
9176 raw : sudo mkdir -p /etc/docker
9277
You can’t perform that action at this time.
0 commit comments