Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit fa8d317

Browse files
authored
Version 1.4.1
2 parents 2bb9f62 + 3533ea4 commit fa8d317

File tree

11 files changed

+331
-152
lines changed

11 files changed

+331
-152
lines changed

.travis.yml

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,36 @@
11
---
22
language: python
3-
python: "2.7"
4-
5-
# Use the new container infrastructure
6-
sudo: false
7-
8-
# Install ansible
9-
addons:
10-
apt:
11-
packages:
12-
- python-pip
3+
services: docker
4+
5+
env:
6+
global:
7+
- ROLE_NAME: users
8+
matrix:
9+
- MOLECULE_DISTRO: centos7
10+
- MOLECULE_DISTRO: centos6
11+
- MOLECULE_DISTRO: ubuntu1804
12+
- MOLECULE_DISTRO: debian9
13+
- MOLECULE_DISTRO: debian10
14+
- MOLECULE_DISTRO: fedora29
1315

1416
install:
15-
# Install ansible
16-
- pip install ansible
17-
18-
# Install ansible-lint
19-
- pip install ansible-lint
20-
21-
# Install yamllint
22-
- pip install yamllint
17+
- pip install molecule docker
2318

24-
# Install tests rules
25-
- git submodule add https://github.com/arillso/tests tests
19+
- git clone https://github.com/arillso/tests molecule/default/lint
2620

2721
before_script:
28-
# Check ansible version
29-
- ansible --version
30-
31-
# Check ansible-lint version
32-
- ansible-lint --version
33-
34-
# Check ansible-lint version
35-
- yamllint --version
22+
- cd ../
23+
- mv ansible.$ROLE_NAME arillso.$ROLE_NAME
24+
- cd arillso.$ROLE_NAME
3625

3726
script:
38-
# Ansible Lint check
39-
- ansible-lint -R -r tests/ansible-lint/ .
40-
41-
# YAML Lint check
42-
- yamllint -c tests/yaml-lint/yamllint.yml .
27+
- molecule test
4328

4429
notifications:
45-
webhooks: https://galaxy.ansible.com/api/v1/notifications/
30+
webhooks:
31+
urls:
32+
- https://galaxy.ansible.com/api/v1/notifications/
33+
on_success: always
4634
email:
4735
on_success: never
4836
on_failure: always

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Changelog
2+
3+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
4+
and [human-readable changelog](https://keepachangelog.com/en/1.0.0/).
5+
6+
## 1.4.1
7+
8+
### Changed
9+
10+
- update min ansible version to 2.8
11+
- moved changelog from readme
12+
- travis file has been updated
13+
- Documentation has been improved
14+
- change var `users_host_vars` to `users_list_host`
15+
- change var `users_group_vars` to `users_list_group`
16+
17+
### Added
18+
19+
- molecule testing
20+
21+
## 1.4.0
22+
23+
### Removed
24+
25+
- remove become in Windows
26+
27+
## 1.3.0
28+
29+
### Added
30+
31+
- add support for users on group and host vars layer
32+
- add support no log when password or key then aktive no log
33+
34+
## 1.2.0
35+
36+
### Fixed
37+
38+
- fix lint
39+
40+
### Added
41+
42+
- new strucktur
43+
44+
## 1.1
45+
46+
### Added
47+
48+
- add windows support
49+
50+
## 1.0.0
51+
52+
### Added
53+
54+
- Initial release

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 Simon Bärlocher
1+
Copyright (c) 2020 Arillso
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
19+
THE SOFTWARE.

README.md

Lines changed: 99 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ansible Role: users
22

3-
[![Build Status](https://travis-ci.org/arillso/ansible.users.svg?branch=master)](https://travis-ci.org/arillso/ansible.users) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://sbaerlo.ch/er/licence) [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-users-blue.svg)](https://galaxy.ansible.com/arillso/users)
3+
[![Build Status](https://img.shields.io/travis/arillso/ansible.users.svg?branch=master&style=popout-square)](https://travis-ci.org/arillso/ansible.users) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=popout-square)](https://sbaerlo.ch/licence) [![Ansible Galaxy](https://img.shields.io/badge/ansible--galaxy-users-blue.svg?style=popout-square)](https://galaxy.ansible.com/arillso/users) [![Ansible Role](https://img.shields.io/ansible/role/d/21607.svg?style=popout-square)](https://galaxy.ansible.com/arillso/users)
44

55
## Description
66

@@ -18,62 +18,128 @@ None
1818

1919
## Role Variables
2020

21-
| Variable | Default | Comments (type) |
22-
| :--- | :--- | :--- |
23-
| users | [] | list of users to add, See defaults |
24-
| users_host_vars | [] | list of users to add by host vars, See users |
25-
| users_group_vars | [] | list of users to add by group vars, See users |
26-
| users_home | /home | users home directory |
27-
| users_home_mode | "0755" | default user's home directory permissions |
28-
| users_ssh_key_type | rsa | default user's ssh key type |
29-
| users_ssh_key_bits | 2048 | default user's ssh key bits |
30-
| users_authorized_keys_exclusive | no | default user's setting for authorized keys exclusive |
21+
### Users
3122

32-
## Dependencies
23+
list of users to add
3324

34-
None
25+
```yml
26+
users: []
27+
```
3528
36-
## Example Playbook
29+
```yml
30+
list of users to add by host vars
31+
users_list_host: []
32+
```
33+
34+
list of users to add by group vars
3735
3836
```yml
39-
- hosts: all
40-
roles:
41-
- arillso.users
37+
users_list_group: []
38+
```
39+
40+
#### Example
41+
42+
```yml
43+
users:
44+
- username: foobar (required)
45+
name: Foo Bar
46+
uid: 1000
47+
group: staff
48+
password: xxxxx (a hash created with: mkpasswd)
49+
groups: ["adm", "www-data"]
50+
append: no (only append groups, leave others)
51+
home_mode: "0750"
52+
home_create: yes
53+
home: /path/to/user/home
54+
system: no
55+
authorized_keys: []
56+
authorized_keys_exclusive: yes
57+
ssh_key_type: rsa
58+
ssh_key_bits: 2048
59+
ssh_key_password: ""
60+
ssh_key_generate: no
61+
ssh_key: "xxx"
62+
shell: /bin/bash
63+
update_password: always
64+
65+
```
66+
67+
```yml
68+
users:
69+
- username: foobar (required)
70+
name: Foo Bar
71+
description: User
72+
password: xxxxx
73+
groups: ['adm', 'www-data']
74+
hide: true
75+
```
76+
77+
users home directory
78+
79+
```yml
80+
users_home: /home
81+
```
82+
83+
default user's primary group for users
84+
85+
```yml
86+
users_group:
87+
```
88+
89+
default user's secondary groups
90+
91+
```yml
92+
users_groups: []
4293
```
4394
44-
## Changelog
95+
default user's home directory permissions
4596
46-
### 1.4
97+
```yml
98+
users_home_mode: '0755'
99+
```
100+
101+
default user's ssh key type
47102
48-
* remove become in Windows
103+
```yml
104+
users_ssh_key_type: rsa
105+
```
49106
50-
### 1.3
107+
default user's ssh key bits
51108
52-
* add support for users on group and host vars layer
53-
* add support no log when password or key then aktive no log
109+
```yml
110+
users_ssh_key_bits: 2048
111+
```
54112
55-
### 1.2
113+
default user's setting for authorized keys exclusive
56114
57-
* fix lint
58-
* new strucktur
115+
```yml
116+
users_authorized_keys_exclusive: 'no'
117+
```
59118
60-
### 1.1
119+
## Dependencies
61120
62-
* add windows support
121+
None
63122
64-
### 1.0
123+
## Example Playbook
65124
66-
* Initial release
125+
```yml
126+
- hosts: all
127+
roles:
128+
- arillso.users
129+
```
67130
68131
## Author
69132
70-
* [Simon Bärlocher](https://sbaerlocher.ch)
71-
* We Are Interactive
133+
- [Simon Bärlocher](https://sbaerlocher.ch)
134+
135+
## Inspiration
136+
137+
- [We Are Interactive](https://github.com/weareinteractive/ansible-users)
72138
73139
## License
74140
75141
This project is under the MIT License. See the [LICENSE](https://sbaerlo.ch/licence) file for the full license text.
76142
77143
## Copyright
78144
79-
(c) 2017, Simon Bärlocher
145+
(c) 2020, Arillso

defaults/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@
3535
# list of users to add
3636
users: []
3737
# list of users to add by host vars
38-
users_host_vars: []
38+
users_list_host: []
3939
# list of users to add by group vars
40-
users_group_vars: []
40+
users_list_group: []
4141
# users home directory
4242
users_home: /home
4343
# default user's primary group for users
4444
users_group:
4545
# default user's secondary groups
4646
users_groups: []
4747
# default user's home directory permissions
48-
users_home_mode: "0755"
48+
users_home_mode: '0755'
4949
# default user's ssh key type
5050
users_ssh_key_type: rsa
5151
# default user's ssh key bits
5252
users_ssh_key_bits: 2048
5353
# default user's setting for authorized keys exclusive
54-
users_authorized_keys_exclusive: no
54+
users_authorized_keys_exclusive: 'no'

meta/main.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
---
2-
32
galaxy_info:
43
author: arillso
5-
description: This is an Ansible role which users and user's authorized keys manages on Linux and Windows.
4+
description: Role to manage users on Linux and Windows.
65
license: MIT
7-
min_ansible_version: 2
6+
min_ansible_version: 2.9
87
platforms:
9-
- name: Debian
10-
versions:
11-
- wheezy
12-
- jessie
13-
- stretch
14-
- name: Ubuntu
15-
versions:
16-
- trusty
17-
- xenial
188
- name: EL
199
versions:
2010
- 6
2111
- 7
12+
- name: Fedora
13+
versions:
14+
- 29
15+
- name: Ubuntu
16+
versions:
17+
- bionic
18+
- cosmic
19+
- name: Debian
20+
versions:
21+
- jessie
22+
- stretch
23+
- buster
2224
- name: Windows
2325
versions:
2426
- all
27+
2528
galaxy_tags:
2629
- system
30+
- users
31+
- user

0 commit comments

Comments
 (0)