added ansible user

This commit is contained in:
Shankar Mounesh
2022-06-12 18:25:55 +05:30
parent f9136415a7
commit 9ff48de7fc
4 changed files with 19 additions and 12 deletions
+16 -8
View File
@@ -19,11 +19,6 @@
dest: /etc/apt/sources.list.d/pve-enterprise.list
owner: root
group: root
# - name: Remove ansible repo
# community.general.apt_repo:
# repo: ansible/ansible
# state: absent
tasks:
@@ -33,6 +28,19 @@
- name: dist upgrade
apt: upgrade=dist
- name: Unconditionally reboot the machine with all defaults
reboot:
reboot_command: reboot
- name: adding a user for ansible cron job
user:
name: ansible
system: yes
- name: setup sudo for ansible user
copy:
src: files/sudoer_ansible
dest: /etc/sudoers.d/ansible
owner: root
group: root
mode: 0440
- name: reboot the machine
ansible.builtin.shell: reboot