update requirements.yml and ansible.config
start home.xai-corp.net and home02.xai-corp.net playbooks
This commit is contained in:
33
ansible_user.yml
Normal file
33
ansible_user.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
# playbook for home02
|
||||
|
||||
|
||||
- hosts: managed
|
||||
# remote_user: anansibsible
|
||||
gather_facts: yes
|
||||
become: true
|
||||
|
||||
vars:
|
||||
- users:
|
||||
- name: "ansible"
|
||||
state: present
|
||||
shell: /bin/bash
|
||||
createhome: yes
|
||||
password: "$6$7z7PfYwduXom0o73$DEiy3K15URNNjmKkOQIwx8/mFKArUNYkFn8D/4q6t/eP9hf1X9jnG4YuSjI7q1Dnp1HwukZUxZY7cF2JK5DO/."
|
||||
ssh_keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAmJSdmj03d4fnZUuRByevPDNiReEk1fRL+7F9WPCo5zn+r5Oj84HXxd4P03DNXeGSBYmUAnsTqYEGdkjkpSrKfMm9bv8amL7hUC+Mzb+wOmXmyX1cw/SearYCBQRCz1s5p7I9+PO7XWaC0VJ99LUm1Bp4JM149U5X0Y3M2j2XV+0= RSA-1024
|
||||
uid: "1001"
|
||||
groups:
|
||||
- sudo
|
||||
- users_groups:
|
||||
|
||||
roles:
|
||||
- novuso.users
|
||||
|
||||
tasks:
|
||||
- name: add ansible to sudoers
|
||||
lineinfile:
|
||||
dest: /etc/sudoers
|
||||
state: present
|
||||
regexp: '^ansible ALL='
|
||||
line: 'ansible ALL=(ALL) NOPASSWD: ALL'
|
||||
validate: 'visudo -cf %s'
|
||||
Reference in New Issue
Block a user