Add local support to ansible
[lttng-ci.git] / automation / ansible / roles / common / tasks / main.yml
CommitLineData
3ea0152b
MJ
1---
2# Include variables and define needed variables.
3- name: Include OS-specific variables.
4 include_vars: "{{ ansible_os_family }}.yml"
5
6- name: Define common_packages.
7 set_fact:
8 common_packages: "{{ __common_packages | list }}"
9 when: common_packages is not defined
10
11# Setup/install tasks.
12- include: setup-RedHat.yml
13 when: ansible_os_family == 'RedHat'
14
15- include: setup-Debian.yml
16 when: ansible_os_family == 'Debian'
17
18- name: Create sudoers.d directory.
19 file:
20 path: /etc/sudoers.d
21 owner: root
22 group: root
23 mode: 0755
24 state: directory
25
26- name: Set includedir in /etc/sudoers.
27 lineinfile:
28 dest: /etc/sudoers
29 line: "#includedir /etc/sudoers.d"
30 state: present
31 validate: "/usr/sbin/visudo -cf %s"
32
33- name: Create jenkins sudoers file.
34 copy:
35 dest: "/etc/sudoers.d/jenkins"
36 content: "jenkins ALL=NOPASSWD: ALL"
37 mode: 0440
38 owner: root
39 group: root
40 validate: "/usr/sbin/visudo -cf %s"
This page took 0.024156 seconds and 4 git commands to generate.