- 1. change directory
- 2. First at Once, Build Python Environtment on your Host Machine
- 3. build local dev server
- 4. provision production server
$ cd wordpress-ansible
$ pyenv install 3.9.4
$ pyenv local 3.9.4
$ pipenv install ansible --dev
$ cp ansible/vars/local/secret.sample.yml ansible/vars/local/secret.yml
$ ansible-vault encrypt ansible/vars/local/secret.yml
Shell will asks you that enter a new password for secret.yml ecryption:
New Vault password:
Confirm New Vault password:
Encryption successful
$ vi ansible/.vault_password
Then, write out your vault password into the ansible/.vault_password
it would be exact same you entered on the above step.
$ pipenv shell
$ vagrant up --provision
$ ansible-playbook -i hosts/lightsail provision.yaml