diff --git a/ansible/README.md b/ansible/README.md index c125fa0..080dce8 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -17,11 +17,11 @@ $ sudo apt install -y ansible ## Setup a New XPPL ```bash -$ ansible-playbook --limit varia-zone --ask-become-pass plays/setup.yml +$ ansible-playbook --limit varia.zone --ask-become-pass plays/setup.yml ``` ## Deploy a New XPPL Version ```bash -$ ansible-playbook --limit varia-zone --ask-become-pass plays/deploy.yml +$ ansible-playbook --limit varia.zone --ask-become-pass plays/deploy.yml ``` diff --git a/ansible/inventory b/ansible/inventory index 4f998c9..7c8172a 100644 --- a/ansible/inventory +++ b/ansible/inventory @@ -1,2 +1,2 @@ -[managed] +[all] varia.zone ansible_ssh_port=12345 diff --git a/ansible/plays/deploy.yml b/ansible/plays/deploy.yml index 2e6fa00..80e8195 100644 --- a/ansible/plays/deploy.yml +++ b/ansible/plays/deploy.yml @@ -1,6 +1,9 @@ --- -- hosts: managed +# Just deploy a new version of the the XPPL. +# Depends on setup.yml being ran first to set things up. + +- hosts: all pre_tasks: - name: Shutdown the running XPPL for the deployment. become: true @@ -17,4 +20,4 @@ become: true supervisorctl: name: 'xppl:' - state: stopped + state: started diff --git a/ansible/plays/setup.yml b/ansible/plays/setup.yml index 284955e..55abc9d 100644 --- a/ansible/plays/setup.yml +++ b/ansible/plays/setup.yml @@ -1,6 +1,9 @@ --- -- hosts: managed +# Setup all necessary infrastructure for the project. +# Install the project and get it running under supervisor. + +- hosts: all roles: - role: perms # Setup users and groups - role: git # Clone the project source