completed course

This commit is contained in:
Ilgar Naghiyev
2020-03-28 17:34:20 +01:00
parent 7d523c8154
commit 6f04a7ff10
4 changed files with 126 additions and 2 deletions

10
playbooks/add-group.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- hosts: all
user: ansible
become: yes
gather_facts: no
tasks:
- name: Ensure group "developers" exists
group:
name: developers
state: present

View File

@@ -0,0 +1,15 @@
---
- hosts: all
user: ansible
become: yes
gather_facts: no
tasks:
- name: Add a consultant whose account you want to expire
user:
name: james20
shell: /bin/bash
groups: developers
append: yes
expires: 1585402826 #epoch time here
password: $6$U/WVBoCW$UX62EjlZLVucylus7N8NZ4/WV2o6kDFIMwaPAjNukwnVxYrF3tZhOCnJwnIXwxseRVrxybneDrYJuTXQ0hpAS0
# we added password hash above

View File

@@ -0,0 +1,10 @@
---
- hosts: all
user: ansible
become: yes
gather_facts: no
tasks:
- name: Enable SELinux
selinux:
policy: targeted
state: enforcing