- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Does anybody developed an Ansible playbook for...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anybody developed an Ansible playbook for creating users on GAIA ?
I mean with the GAIA specifics and not "only" the Linux standards like the following example.
---
- name: Create user
user: name=user shell=/bin/bash home=/srv/user groups=admin,sudo generate_ssh_key=yes ssh_key_bits=2048
- name: Set password to user
shell: echo user:plain_text_password | sudo chpasswd
no_log: True
- Tags:
- automation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use:
- name: "Add scp user"
command: "{{ item }}"
with_items:
- clish -c 'add user scpuser uid 2600 homedir /home/scpuser' -s
- clish -c 'add rba role scpRole domain-type System readwrite-features expert' -s
- clish -c 'add rba user scpuser roles scpRole' -s
- clish -c 'set user scpuser gid 100 shell /usr/bin/scponly' -s
- clish -c 'set user scpuser password-hash <HASH>' -s
Thanks for Danny Jung for HowTo - Creating an scpuser account on Gaia Clish
Thanks for @Ryan Darst for CheckMates_Aug15_Demos.zip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thx a lot....beside global script repository this is an good Option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My playbook (I'm using playbook and not role)
Please fix the format (scpuser/vpn123)
- name: "Add scp user"
command: "{{ item }}"
with_items:
- clish -c 'lock database override' -si
- clish -c 'add user scpuser uid 2600 homedir /home/scpuser' -si
- clish -c 'add rba role scpRole domain-type System all-features' -si
- clish -c 'add rba user scpuser roles scpRole' -si
- clish -c 'set user scpuser gid 100 shell /usr/bin/scponly' -si
- clish -c 'set user scpuser password-hash $1$O8IbUP0w$asylKUt4DUVDoemt95ubh.' -si
- clish -c 'unlock database' -si
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what to do if you have two gw in cloning group ?
I get this error : This command belongs to a cloning group synchronized feature and therefore cannot be executed in normal mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you should able to do this using the asnible role "gaia_fw1"
