Skip to content

Commit

Permalink
prepare with ansible-sudo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraheim committed May 27, 2018
1 parent 9f9291a commit 486c6ca
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions ansible-sudo.yml
@@ -0,0 +1,26 @@
- hosts: "{{ hosts | default('all') }}"
tasks:
- yum: name="sudo"
- name: wheel group nopasswd sudo
shell: |
sed -i -e '/%wheel.*NOPASSWD/{s/^[#]* //;n}' -e 's/^.*%wheel/# &/' /etc/sudoers
- name: create user ansible
user:
name: ansible
group: root
groups: wheel
- name: remove ipv6 localhost
shell: |
sed -e "/^::1/s/[ ]localhost//" /etc/hosts > /etc/hosts.tmp
cat /etc/hosts.tmp > /etc/hosts
rm /etc/hosts.tmp
- name: /usr/bin/systemctl py
copy:
src: files/docker/systemctl.py
dest: /usr/bin/systemctl
- name: /var/log/systemctl.log
shell: "touch /var/log/systemctl.log"
- name: ansible check_systemd
file:
path: /run/systemd/system
state: directory

0 comments on commit 486c6ca

Please sign in to comment.