Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python -c "from passlib.hash import sha512_crypt; print sha512_crypt.encrypt('somepassword')"
- ---
- vault_appadmin_password: $6$rounds=656000$jx.GAgbpfoUS2Iry$apQoWdHFrDujWeEA5I9iHDR5hiVzfDsa2.FtwD8YKNRhzmc8Gc0BTrscyncqW5B2FSsx1ebTpmvV3JrC3vcEs1
- ---
- # User that will run sudo commands
- - name: Add Admin User
- user:
- name: "{{ admin_username }}"
- groups: sudo
- password: "{{ admin_password }}"
- shell: /bin/bash
- # User that will be using our application
- - name: Add Application User
- user:
- name: "{{ appuser_username }}"
- password: "{{ appuser_password }}"
- groups: sudo
- shell: /bin/bash
- generate_ssh_key: yes
- ssh_key_bits: 4096
- - name: Enable Remote (person) Access to Admin
- authorized_key:
- user: "{{ admin_username }}"
- key: "{{ local_authorized_key }}"
- path: "/home/{{ admin_username }}/.ssh/authorized_keys"
- - name: Enable Remote (Person) Access to Appuser
- authorized_key:
- user: "{{ appuser_username }}"
- key: "{{ local_authorized_key }}"
- path: "/home/{{ appuser_username }}/.ssh/authorized_keys"
- ansible-playbook --private-key=~/.ssh/id_rsa -i hosts playbook.yml --limit=staging
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement