Coder Social home page Coder Social logo

ansible-user's People

Contributors

nickjj avatar quotengrote avatar riteshpuj2013 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ansible-user's Issues

User once added to sudoers does not get removed

Hi,

Your ansible role fails in a particular scenario and fails to maintain state on the target server as per the value of "user_enable_passwordless_sudo".

Steps:

  1. Set "user_enable_passwordless_sudo" to True and execute ansible script on target server.
  2. Set "user_enable_passwordless_sudo" to False and execute ansible script on target server.
  3. Observe that user is not removed from sudoers file on target server.

I have made change and tested on my local.
Would you accept PR for this issue?

--
Best Regards,
Ritesh

Set multiple ssh keys

user_local_ssh_key_path: "~/.ssh/id_rsa.pub"

It would be helpful if we could specify multiple keys, or write the authorized_keys inline.

Installation, version control

Hi Nick,

ansible-galaxy has --roles-path so that I can put your cool roles right in my project's roles/ dir.

Better, a ./requirements.yml with:

---
- name: ansible-user
  src: https://github.com/nickjj/ansible-user

Then ansible-galaxy install -r requirements.yml

With ./ansible.cfg having:

[defaults]
roles_path = roles.galaxy:roles

Works a treat!

Would this be a useful edit to README.md and PR?

Cheers,
Greg (gbellinoz)

Content has no field named 'owner'

Getting the error WARNING]: - . was NOT installed successfully: Content has no field named 'owner' on using ansible-galaxy install nickjj.user .

set random password

Hello,

Would you consider adding a random password to the user creation 'cause otherwise the account is locked and passwordless keys will not work.

Try this role and then dev-sec.ssh-hardening. You will not be able to login at all.

- name: Create user
  user:
    generate_ssh_key: "{{ user_generate_ssh_key }}"
    groups: "{{ (user_groups | join(',')) }}"
    append: True
    name: "{{ user_name }}"
    shell: "{{ user_shell }}"
    # this generates a hashed and random uuid string
    password: "{{ 9999999999999999999999 | random | string | to_uuid | password_hash('sha512', 65534 | random | string) }}"
    update_password: on_create

% or # ?

Hi Nick,

Did you mean for the leading % here? Because that means "group named", but user_name is not a group name.

- name: Enable passwordless sudo
  copy:
    content: '%{{ user_name }} ALL=(ALL) NOPASSWD:ALL'

Usually works, except I accidentally nuked my user "app"'s ownership in the group named app and sudo suddenly started asking me for a password.

(I think ansible has a bug with their group module, but that's not your issue).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.