diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-26 22:33:54 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-26 22:33:54 +0100 |
commit | b7bccaf7ff75fd2234b9232f595cbc8e226b80e9 (patch) | |
tree | 3e2822166b9be455f7589e56ca28a685bbccd2d8 /ansible/roles/trygvis-base/tasks | |
parent | 6fe44ad6366232314d45502d387ccbc671e84d9f (diff) | |
download | infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.tar.gz infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.tar.bz2 infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.tar.xz infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.zip |
o Importing bitraf-base, packages and postfix-satellite from Bitraf.
o Configuring nextcloud.
Diffstat (limited to 'ansible/roles/trygvis-base/tasks')
-rw-r--r-- | ansible/roles/trygvis-base/tasks/main.yml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/ansible/roles/trygvis-base/tasks/main.yml b/ansible/roles/trygvis-base/tasks/main.yml new file mode 100644 index 0000000..d753056 --- /dev/null +++ b/ansible/roles/trygvis-base/tasks/main.yml @@ -0,0 +1,57 @@ +- become: true + tags: + - trygvis-base + - trygvis-base-misc + block: + - name: /etc/localtime + when: trygvis_base__etc_localtime + file: + src: /usr/share/zoneinfo/Europe/Oslo + dest: /etc/localtime + state: link + force: yes + notify: reconfigure tzdata + + - name: remove ~root/.ssh/authorized_keys + when: trygvis_base__remove_root_authorized_keys + file: + path: ~root/.ssh/authorized_keys + state: absent + + - name: /etc/hosts + when: trygvis_base__fix_hosts + copy: + dest: /etc/hosts + content: | + 127.0.0.1 localhost + 127.0.1.1 {{ ansible_hostname }}.trygvis.io {{ ansible_hostname }} + ::1 localhost ip6-localhost ip6-loopback + ff02::1 ip6-allnodes + ff02::2 ip6-allrouters + + - name: stat /etc/aliases + register: etc_aliases + stat: + path: /etc/aliases + - name: /etc/aliases + when: trygvis_base__fix_aliases and etc_aliases.stat.exists + notify: postalias /etc/aliases + lineinfile: + path: /etc/aliases + regexp: "^root:" + line: "root: root@trygvis.no" + +- become: true + tags: + - trygvis-base + - trygvis-base-syslog + when: trygvis_base__syslog + block: + - name: + vars: + items: + - rsyslog + apt: + name: "{{ items }}" + state: present + install_recommends: no |