Add apt cacher and update tasks
+ add nhadmin user to systemd-journal
This commit is contained in:
parent
6f75603c90
commit
ca78164ab3
@ -6,6 +6,16 @@
|
|||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
# APT Cacher-NG Configuration
|
||||||
|
- name: Add APT-Cacher-NG Configuration
|
||||||
|
copy:
|
||||||
|
content: "# APT-Cacher-NG configured by Ansible.\nAcquire::http::Proxy "http://{{ aptcacher_ip }}:3142";"
|
||||||
|
dest: /etc/apt/apt.conf.d/proxy
|
||||||
|
|
||||||
|
# Update apt package lists after adding our proxy
|
||||||
|
- name: Update apt repo package lists from cacher
|
||||||
|
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
||||||
|
|
||||||
# User account (ansible) configuration
|
# User account (ansible) configuration
|
||||||
- name: Add deployment user.
|
- name: Add deployment user.
|
||||||
user:
|
user:
|
||||||
@ -60,8 +70,8 @@
|
|||||||
state: present
|
state: present
|
||||||
password: "{{ nhadmin_password | password_hash('sha512') }}"
|
password: "{{ nhadmin_password | password_hash('sha512') }}"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
# add to sudo
|
# add to sudo, systemd-journal
|
||||||
groups: sudo
|
groups: sudo systemd-journal
|
||||||
append: yes
|
append: yes
|
||||||
# Sysadmin user SSH pub key
|
# Sysadmin user SSH pub key
|
||||||
# This is a really stupid way to do it, but alas.
|
# This is a really stupid way to do it, but alas.
|
||||||
@ -102,4 +112,7 @@
|
|||||||
- name: Delete our network ansible key (and other keys) from the root user.
|
- name: Delete our network ansible key (and other keys) from the root user.
|
||||||
file:
|
file:
|
||||||
path: /root/.ssh/authorized_keys
|
path: /root/.ssh/authorized_keys
|
||||||
state: absent
|
state: absent
|
||||||
|
# Upgrade all apt packages for good measur
|
||||||
|
- name: Upgrade all apt packages
|
||||||
|
apt: upgrade=dist force_apt_get=yes
|
Loading…
x
Reference in New Issue
Block a user