roles/bootstrap/tasks/main.yml

Fri, 16 Aug 2019 19:07:18 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 16 Aug 2019 19:07:18 -0400
changeset 94
3879346354aa
parent 88
3dbfd253c775
permissions
-rw-r--r--

Update README.md

73
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 ---
76
9c024e39a565 clean up task names
Meredith Howard <mhoward@roomag.org>
parents: 73
diff changeset
2 - name: "Ansible control user"
73
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 user:
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 name: ansible
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 comment: "Ansible Controller"
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 home: /var/lib/ansible
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 createhome: true
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 append: true
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 system: true
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 state: present
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11
76
9c024e39a565 clean up task names
Meredith Howard <mhoward@roomag.org>
parents: 73
diff changeset
12 - name: "Ansible pubkeys"
73
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 authorized_key:
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 manage_dir: true
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 user: ansible
88
3dbfd253c775 separate disable_stock_users role
Meredith Howard <mhoward@roomag.org>
parents: 76
diff changeset
16 key: "{{ item }}"
73
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 with_file:
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 - 'public_keys/ansible'
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19
76
9c024e39a565 clean up task names
Meredith Howard <mhoward@roomag.org>
parents: 73
diff changeset
20 - name: "Ansible sudo"
73
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 lineinfile:
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 dest: /etc/sudoers
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 state: present
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24 regexp: '^ansible'
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 line: 'ansible ALL=(ALL) NOPASSWD: ALL'
8b0c09efbb5b add bootstrap role
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 validate: 'visudo -cf "%s"'

mercurial