Skip to content

Instantly share code, notes, and snippets.

View amirrezaalavi's full-sized avatar

Amir R. Alavi amirrezaalavi

View GitHub Profile
@cmsj
cmsj / smbpassword-ansible.md
Created August 24, 2023 23:37
Setting Samba passwords with Ansible

Scenario: You want to create a user in Linux, and set a Samba password for it, all from Ansible:

Notes:

  • This will not update the Samba password if you change the variable.

To create the encrypted vault string, run: ansible-vault encrypt_string --ask-vault-password 'some_password'

- name: Create OS group