Kaynağa Gözat

update role definitions for new ansible version

master
ebeveyn
işleme
fffae747b9
6 değiştirilmiş dosya ile 14 ekleme ve 15 silme
  1. +1
    -1
      tasks/home.yml
  2. +2
    -2
      tasks/linger.yml
  3. +4
    -5
      tasks/setup_Debian.yml
  4. +3
    -3
      tasks/ssh.yml
  5. +1
    -1
      tasks/user_groups.yml
  6. +3
    -3
      tasks/users.yml

+ 1
- 1
tasks/home.yml Dosyayı Görüntüle

@@ -7,4 +7,4 @@
group: "{{ item }}"
mode: "{{ users[item].homedir_mode | default(700) }}"
state: directory
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"

+ 2
- 2
tasks/linger.yml Dosyayı Görüntüle

@@ -4,7 +4,7 @@
stat:
path: /var/lib/systemd/linger/{{item}}
register: _users_systemd_linger_stat
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"
when:
- users[item].linger is defined

@@ -13,7 +13,7 @@
loginctl
{{ users[item].linger | ternary('enable','disable') }}-linger
{{item}}
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"
when:
- users[item].linger is defined
- (


+ 4
- 5
tasks/setup_Debian.yml Dosyayı Görüntüle

@@ -1,8 +1,7 @@
---

- name: install debian packages
package:
name: "{{ item }}"
with_items:
- dbus
- libpam-systemd
apt:
pkg:
- dbus
- libpam-systemd

+ 3
- 3
tasks/ssh.yml Dosyayı Görüntüle

@@ -5,7 +5,7 @@
name: "{{ item }}"
generate_ssh_key: yes
ssh_key_type: ed25519
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"

- name: ssh directory
file:
@@ -14,7 +14,7 @@
group: "{{ item }}"
mode: "700"
state: directory
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"

- name: ssh authorized keys
template:
@@ -22,5 +22,5 @@
dest: "{{ users[item].home | default('/home/'+item) }}/.ssh/authorized_keys"
owner: "{{ item }}"
group: "{{ item }}"
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"
when: users[item].ssh_authorized_keys is defined

+ 1
- 1
tasks/user_groups.yml Dosyayı Görüntüle

@@ -4,4 +4,4 @@
group:
name: "{{ item }}"
gid: "{{ user_groups[item].gid }}"
with_items: "{{ user_groups.keys() }}"
loop: "{{ user_groups.keys() | list }}"

+ 3
- 3
tasks/users.yml Dosyayı Görüntüle

@@ -4,7 +4,7 @@
group:
name: "{{ item }}"
gid: "{{ users[item].gid }}"
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"
when: users[item].gid is defined

- name: account
@@ -15,12 +15,12 @@
uid: "{{ users[item].uid }}"
home: "{{ users[item].home | default('/home/'+item) }}"
shell: "{{ users[item].shell | default('/usr/bin/fish') }}"
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"
notify: restart systemd-logind.service

- name: password
user:
name: "{{ item }}"
password: "{{ users[item].password }}"
with_items: "{{ users.keys() }}"
loop: "{{ users.keys() | list }}"
when: users[item].password is defined

Yükleniyor…
İptal
Kaydet