Răsfoiți Sursa

Update ansible.md

Nordstrand 3 ani în urmă
părinte
comite
5558ff4bd9
1 a modificat fișierele cu 7 adăugiri și 4 ștergeri
  1. 7 4
      config/automation/ansible.md

+ 7 - 4
config/automation/ansible.md

@@ -6,22 +6,25 @@ breadcrumbs:
 ---
 {% include header.md %}
 
-## Usage
-
-### Ad Hoc
+## Ad Hoc Usage
 
 - Run module for host: `ansible all -i <host>, -m <module> [-a <module-arg>]`
     - The comma after the host is required to treat it as a host list literal instead of an inventory file name.
     - Use `-i localhost, --connection=local` to run locally.
 - Get facts (with optional filter): `ansible all -i <host>, -m setup -a 'filter=ansible_os_*'` (example fact filter)
 
-### Playbooks
+## Playbooks
 
 - Basic: `ansible-playbook <playbook>`
 - Specify inventory file: `ansible-playbook -i <hosts> <playbook>`
 - Limit which groups/hosts to use (comma-separated): `ansible-playbook -l <group|host> <playbook>`
 - Limit which tasks to run using tags (comma-separated): `ansible-playbook -t <tag> <playbook>`
 
+## Vault
+
+- Use file for password: Just add the password as the only line in a file.
+- Encrypt, prompt for secret, using password file: `ansible-vault encrypt_string --vault-password-file ~/.ansible_vault/stuff`
+
 ## Configuration
 
 Example `/etc/ansible/ansible.cfg` or `~/.ansible.cfg`: