Commit initiale
This commit is contained in:
parent
b8492ce4a5
commit
d1bbf6a3da
13
local.yml
13
local.yml
@ -3,8 +3,13 @@
|
|||||||
connection: local
|
connection: local
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- name: update repositories
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
changed_when: False
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: install htop
|
- include: tasks/users.yml
|
||||||
package:
|
- include: tasks/cron.yml
|
||||||
name: htop
|
- include: tasks/packages.yml
|
||||||
state: absent
|
|
||||||
6
tasks/cron.yml
Normal file
6
tasks/cron.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
- name: install cron job (ansible-pull)
|
||||||
|
cron:
|
||||||
|
user: ansible
|
||||||
|
name: "ansible provision"
|
||||||
|
minute: "*/10"
|
||||||
|
job: "/usr/bin/ansible-pull -o -U https://github.com/jlacroix82/ansible_pull_tutorial.git > /dev/null"
|
||||||
1
tasks/files/sudoers_ansible
Normal file
1
tasks/files/sudoers_ansible
Normal file
@ -0,0 +1 @@
|
|||||||
|
ansible ALL=(ALL) NOPASSWD:ALL
|
||||||
4
tasks/packages.yml
Normal file
4
tasks/packages.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: Install packages
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- chromium
|
||||||
12
tasks/users.yml
Normal file
12
tasks/users.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
- name: create ansible user
|
||||||
|
user:
|
||||||
|
name: ansible
|
||||||
|
system: yes
|
||||||
|
|
||||||
|
- name: copy sudoers_ansible
|
||||||
|
copy:
|
||||||
|
src: files/sudoers_ansible
|
||||||
|
dest: /etc/sudoers.d/ansible
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0440
|
||||||
Loading…
x
Reference in New Issue
Block a user