diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -45,38 +45,37 @@ You can get this dashboard [here](https://grafana.com/grafana/dashboards/15980). 3. Change directory to this repo `cd vps`. 4. Setup repo by running all of the following: ``` -python3 -m venv ~/venv/vps -source $HOME/venv/vps/bin/activate -pip install --upgrade pip -pip install 'ansible<2.10' 'jmespath' -ansible-galaxy install -r requirements.yml -ansible-galaxy collection install -r requirements.yml +make install +# copy all the example files cp -a vaultid.example vaultid cp -a hosts.example hosts cp -a group_vars/all/vault.example group_vars/all/vault ``` ## Develop -1. Modify the [playbooks](./playbooks/) per your needs. -2. Modify the vault per your needs: `ansible-vault edit group_vars/all/vault --vault-id vaultid`. -3. Modify the [hosts](./hosts/) file per your needs. -4. Modify the [vars](./group_vars/all/vars.yaml/) file per your needs. +1. Set your vaultid value to your password. Default: `test`. +2. Modify the [playbooks](./playbooks/) per your needs. +3. Modify the vault per your needs: `make vault-edit group=all`. +4. Modify the [hosts](./hosts/) file per your needs. +5. Modify the [vars](./group_vars/all/vars.yaml/) file per your needs. + +Encrypt your hosts file, and secret vars before uploading to git: +``` +ansible-vault encrypt --vault-id vaultid --output hosts.vault hosts +ansible-vault encrypt --vault-id vaultid --output group_vars/all/vault group_vars/all/vault +``` ## Deploy ``` -# activate venv -source $HOME/venv/vps/bin/activate # run main playbook with "base" tag -ansible-playbook -i hosts playbooks/deploy.yaml --vault-id vaultid --tags base +make file=playbooks/deploy.yaml tags="base" # run main playbook with your apps -ansible-playbook -i hosts playbooks/deploy.yaml --vault-id vaultid [--tags []] +make file=playbooks/deploy.yaml tags="[csv list]" # (and if applicable secondary playbook) -ansible-playbook -i hosts playbooks/vps.yaml --vault-id vaultid +make file=playbooks/vps.yaml ``` ## Future Plans -1. Install a Job executor (Awx, or Rundeck) that will auto-deploy hosted websites upon new commits using the `--tags website` arg. -2. Simplify install. -3. Documentation for each role. -4. Backups. -5. Redundancy. +1. Documentation for each role. +2. Backups. +3. Redundancy. |
