Retouch tasks due to 'become' defaults to True

This commit is contained in:
Tobias Hachmer 2017-09-17 14:43:54 +02:00
parent 951ab924a5
commit 1c928881fc
14 changed files with 5 additions and 27 deletions

View file

@ -1,15 +1,12 @@
---
- name: check apache syntax
command: /usr/sbin/apachectl -t
become: true
- name: restart systemd unit apache2
systemd:
name: apache2
state: restarted
become: true
- name: update apt cache
apt:
update_cache: yes
become: true

View file

@ -4,3 +4,4 @@
repo: https://github.com/freifunk-mwu/sites-ffmwu.git
dest: /home/admin/clones/sites-ffmwu
version: stable
become: false

View file

@ -30,6 +30,7 @@
dest: "/etc/fastd/{{ item.key }}VPN/peers"
update: no
with_dict: "{{ meshes }}"
become: false
- name: clone fastd peer intragate repos
git:
@ -37,3 +38,4 @@
dest: "/etc/fastd/{{ item.key }}igVPN/peers"
update: no
with_dict: "{{ meshes }}"
become: false

View file

@ -5,7 +5,6 @@
state: present
with_items:
- git
become: true
- name: ensure git directory is present
file:
@ -14,10 +13,10 @@
mode: 0755
owner: admin
group: admin
become: true
- name: clone git repositories
git:
repo: "{{ item.value.repo_url }}"
dest: "/home/admin/clones/{{ item.key }}"
with_dict: "{{ common_repos }}"
become: false

View file

@ -18,15 +18,14 @@
- name: ensure admin user
user: comment="FFMWU Administrator" name=admin shell=/bin/bash state=present
become: True
- name: ensure users ssh key to admin user
authorized_key: user=admin key="{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
exclusive=no
become: True
- name: ensure users ssh key to bootstrap user
authorized_key: user=hein key="{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
become: false
- name: ensure no-pw sudo capability for admin and bootstrap user
lineinfile:
@ -35,8 +34,6 @@
line: "admin,hein ALL = (root) NOPASSWD: ALL"
mode: 0440
validate: visudo -c -f %s
become: True
- name: from this point on prevent pw for bootstrap user
user: user=hein password=X
become: True

View file

@ -3,4 +3,3 @@
systemd:
name: sysfsutils
state: restarted
become: true

View file

@ -3,4 +3,3 @@
systemd:
name: sysfsutils
state: restarted
become: true

View file

@ -3,10 +3,8 @@
systemd:
name: bird
state: reloaded
become: true
- name: reload bird6
systemd:
name: bird6
state: reloaded
become: true

View file

@ -10,7 +10,6 @@
with_items:
- 4
- 6
become: true
- name: write ffrl peer configuration
template:
@ -23,4 +22,3 @@
with_items:
- 4
- 6
become: true

View file

@ -3,13 +3,11 @@
systemd:
name: bird
state: reloaded
become: true
- name: reload bird6
systemd:
name: bird6
state: reloaded
become: true
- name: set file attrs 4
file:
@ -17,7 +15,6 @@
mode: 0640
owner: bird
group: bird
become: true
- name: set file attrs 6
file:
@ -25,4 +22,3 @@
mode: 0640
owner: bird
group: bird
become: true

View file

@ -10,7 +10,6 @@
with_items:
- 4
- 6
become: true
- name: write initial icvpn roa config
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkroa -{{ item.key }} -f bird -x mwu -m {{ item.value.max_prefix }} -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv{{ item.key }}_roa.conf
@ -25,7 +24,6 @@
max_prefix: 20
6:
max_prefix: 64
become: true
- name: write icvpn bird configuration
template:
@ -38,4 +36,3 @@
with_items:
- 4
- 6
become: true

View file

@ -2,16 +2,13 @@
- name: reload systemd
systemd:
daemon_reload: yes
become: true
- name: reload bird
systemd:
name: bird
state: reloaded
become: true
- name: reload bird6
systemd:
name: bird6
state: reloaded
become: true

View file

@ -4,4 +4,3 @@
name: isc-dhcp-server
enabled: yes
state: restarted
become: true

View file

@ -2,4 +2,3 @@
- name: reload systemd
systemd:
daemon_reload: yes
become: true