Unify some homebrew roles' become methods

This commit is contained in:
Salt 2020-11-08 00:05:48 -06:00
parent f893458e51
commit ddc5c881de
5 changed files with 29 additions and 37 deletions

View File

@ -1,7 +1,5 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: configure ansible-pull
block:
- name: assure vault password file
copy: src=vaultpass dest="~/ansiblevaultpass" mode="0600"
become: yes
@ -17,4 +15,3 @@
- name: enable timer
systemd: daemon_reload=yes name=ansible-pull.timer enabled=yes state=started
notify: restart ansiblepull timer
become: yes

View File

@ -1,7 +1,5 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: configure ansible user
block:
- name: create ansible user
user: name=ansible password_lock=yes
- name: configure ansible user home directory
@ -10,4 +8,3 @@
authorized_key: user=ansible manage_dir=yes key={{ common_ansible_pubkey }}
- name: configure ansible user sudo
lineinfile: path=/etc/sudoers line="ansible ALL=(ALL:ALL) NOPASSWD:ALL"
become: yes

View File

@ -28,5 +28,4 @@
- whois
- name: remove basic packages
apt: state=absent name=unattended-upgrades
become: yes
when: ansible_os_family == "Debian"

View File

@ -1,10 +1,7 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: configure system
block:
- name: configure hostname
hostname: name={{ inventory_hostname }}
- name: configure timezone
timezone: name=America/Chicago
notify: restart cron
become: yes

View File

@ -5,8 +5,10 @@
- hosts: all
roles:
- role: common
become: yes
tags: [ common ]
- role: ansible-pull
become: yes
tags: [ ansible, common ]
# Home desktops
- hosts: desktop