arillso.users

Ansibleロール: ユーザー

重要なお知らせ

ansible.usersロールは新しいコレクションに移動され、このリポジトリでは今後の開発が行われません。新機能やアップデートを含む最新バージョンのロールについては、新しいコレクションを訪れてください: https://github.com/arillso/ansible.system/tree/main/roles/users。 全てのユーザーに、新しいコレクションの更新されたロールに移行することをお勧めします。これにより、継続的なサポートと改善を受けられます。

説明

これは、LinuxおよびWindowsでユーザーとその承認済みキーを管理するAnsibleロールです。

インストール

ansible-galaxy install arillso.users

依存関係

なし

ロール変数

ユーザー

追加するユーザーのリスト

users: []

ホスト変数による追加するユーザーのリスト

users_list_host: []

グループ変数による追加するユーザーのリスト

users_list_group: []

users:
  - username: foobar              (必須)
    name: Foo Bar
    uid: 1000
    group: staff
    password: xxxxx               (mkpasswdで作成されたハッシュ)
    groups: ["adm", "www-data"]
    append: no                    (グループのみ追加、他はそのままにする)
    home_mode: "0750"
    home_create: yes
    home: /path/to/user/home
    system: no
    authorized_keys: []
    authorized_keys_exclusive: yes
    ssh_key_type: rsa
    ssh_key_bits: 2048
    ssh_key_password: ""
    ssh_key_generate: no
    ssh_key: "xxx"
    shell: /bin/bash
    update_password: always
users:
  - username: foobar              (必須)
    name: Foo Bar
    description: ユーザー
    password: xxxxx
    groups: ['adm', 'www-data']
    hide: true

ユーザーのホームディレクトリ

users_home: /home

ユーザーのプライマリグループのデフォルト

users_group:

ユーザーのセカンダリグループのデフォルト

users_groups: []

ユーザーのホームディレクトリのパーミッションのデフォルト

users_home_mode: '0755'

ユーザーのSSHキーのタイプのデフォルト

users_ssh_key_type: rsa

ユーザーのSSHキーのビット数のデフォルト

users_ssh_key_bits: 2048

承認済みキーの排他設定のデフォルト

users_authorized_keys_exclusive: 'no'

依存関係

なし

例プレイブック

- hosts: all
  roles:
    - arillso.users

著者

インスピレーション

ライセンス

このプロジェクトはMITライセンスの下にあります。完全なライセンスのテキストについては、LICENSEファイルをご覧ください。

著作権

(c) 2020, Arillso

プロジェクトについて

Role to manage users on Linux and Windows.

インストール
ansible-galaxy install arillso.users
ライセンス
mit
ダウンロード
611.8k
所有者