added ansible user
This commit is contained in:
@@ -13,10 +13,7 @@ The above command downloads a bash file from 172.16.16.65 and runs the following
|
||||
|
||||
```sh
|
||||
apt update -y;
|
||||
apt install git -y;
|
||||
apt install software-properties-common -y;
|
||||
add-apt-repository --yes --update ppa:ansible/ansible;
|
||||
apt install ansible -y;
|
||||
apt install git ansible -y;
|
||||
ansible --version;
|
||||
ansible-pull -U https://git.bitsathy.ac.in/ShankarMounesh/ansible-proxmox.git
|
||||
```
|
||||
|
||||
@@ -7,4 +7,5 @@ deb http://security.debian.org/debian-security bullseye-security main contrib
|
||||
|
||||
# PVE pve-no-subscription repository provided by proxmox.com,
|
||||
# NOT recommended for production use
|
||||
|
||||
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
|
||||
@@ -0,0 +1 @@
|
||||
ansible ALL=(ALL) NOPASSWD: ALL
|
||||
+16
-8
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user