use ansible_managed instead of own variable ansible_managed_file

This commit is contained in:
Alexander Grothe 2018-01-16 13:07:01 +01:00
parent 92128ccce7
commit 252cade885
12 changed files with 480 additions and 494 deletions

File diff suppressed because it is too large Load Diff

View File

@ -236,16 +236,11 @@ localhost connection=local
#+END_SRC #+END_SRC
* Group Variables * Group Variables
** default text for templates used by ansible ** PPAs
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
--- ---
# file: group_vars/all # file: group_vars/all
# this is the standard text to put in templates
ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***\norigin: {file}"
#+END_SRC
** PPAs
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
branch: experimental branch: experimental
ppa_owner: 'ppa:yavdr' ppa_owner: 'ppa:yavdr'
# add the following PPAs # add the following PPAs
@ -566,7 +561,7 @@ yavdr-common executes the following tasks:
#+END_SRC #+END_SRC
*** templates *** templates
#+BEGIN_SRC c :tangle roles/yavdr-common/templates/90-norecommends.j2 :mkdirp yes :padline no #+BEGIN_SRC c :tangle roles/yavdr-common/templates/90-norecommends.j2 :mkdirp yes :padline no
{{ ansible_managed_file | comment('c') }} {{ ansible_managed | comment('c') }}
// Recommends are as of now still abused in many packages // Recommends are as of now still abused in many packages
APT::Install-Recommends "0"; APT::Install-Recommends "0";
APT::Install-Suggests "0"; APT::Install-Suggests "0";
@ -2074,7 +2069,7 @@ KillMode=mixed
***** Drop-in snippet for vdr.service ***** Drop-in snippet for vdr.service
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no #+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
[Unit] [Unit]
After=x@vt7.service After=x@vt7.service
Wants=x@vt7.service Wants=x@vt7.service
@ -2083,7 +2078,7 @@ Wants=x@vt7.service
***** .xinitrc ***** .xinitrc
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/.xinitrc.j2 :mkdirp yes :padline no #+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/.xinitrc.j2 :mkdirp yes :padline no
#!/bin/bash #!/bin/bash
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
exec openbox-session exec openbox-session
#+END_SRC #+END_SRC
***** xorg.conf ***** xorg.conf
@ -2110,7 +2105,7 @@ Section "Extensions"
EndSection EndSection
#+END_SRC #+END_SRC
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/xorg.conf.j2 #+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/xorg.conf.j2
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
Section "ServerLayout" Section "ServerLayout"
Identifier "Layout0" Identifier "Layout0"
@ -2215,7 +2210,7 @@ EndSection
#+END_SRC #+END_SRC
#+BEGIN_SRC shell :tangle roles/template-test/templates/xorg.conf_test.j2 #+BEGIN_SRC shell :tangle roles/template-test/templates/xorg.conf_test.j2
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
Section "ServerLayout" Section "ServerLayout"
Identifier "Layout0" Identifier "Layout0"
@ -3436,7 +3431,7 @@ systemctl --user isolate yavdr-desktop.target
**** smb.conf **** smb.conf
***** global settings ***** global settings
#+BEGIN_SRC yaml :tangle roles/samba-config/templates/smb.conf.j2 :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/samba-config/templates/smb.conf.j2 :mkdirp yes :padline no
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
#======================= Global Settings ======================= #======================= Global Settings =======================
@ -3645,7 +3640,7 @@ dependencies:
#+END_SRC #+END_SRC
*** templates *** templates
#+BEGIN_SRC conf :tangle roles/autoinstall-atric-usb/templates/lirc_options.conf.j2 :padline no #+BEGIN_SRC conf :tangle roles/autoinstall-atric-usb/templates/lirc_options.conf.j2 :padline no
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
[lircd] [lircd]
nodaemon = False nodaemon = False
@ -3716,7 +3711,7 @@ dependencies:
#+END_SRC #+END_SRC
*** templates *** templates
#+BEGIN_SRC conf :tangle roles/autoinstall-yausbir/templates/lirc_options.conf.j2 :padline no #+BEGIN_SRC conf :tangle roles/autoinstall-yausbir/templates/lirc_options.conf.j2 :padline no
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
[lircd] [lircd]
nodaemon = False nodaemon = False
@ -3972,7 +3967,7 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
dest: /tmp/test.txt dest: /tmp/test.txt
#+END_SRC #+END_SRC
#+BEGIN_SRC shell :tangle roles/template-test/templates/xorg.conf_test.j2 #+BEGIN_SRC shell :tangle roles/template-test/templates/xorg.conf_test.j2
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
Section "ServerLayout" Section "ServerLayout"
Identifier "Layout0" Identifier "Layout0"
@ -4219,7 +4214,7 @@ wakeup_method: "acpiwakeup"
#+END_SRC #+END_SRC
*** templates *** templates
#+BEGIN_SRC jinja2 :tangle roles/wakeup/templates/vdr-addon-acpiwakeup.conf.j2 :padline no #+BEGIN_SRC jinja2 :tangle roles/wakeup/templates/vdr-addon-acpiwakeup.conf.j2 :padline no
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
# Activate/deactivate ACPIWakeup with yes/no: # Activate/deactivate ACPIWakeup with yes/no:
ACPI_ENABLED="{% if wakeup_method == 'acpiwakeup' %}yes{% else %}no{% endif %}" ACPI_ENABLED="{% if wakeup_method == 'acpiwakeup' %}yes{% else %}no{% endif %}"

View File

@ -1,3 +1,5 @@
[defaults] [defaults]
callback_plugins = plugins/callbacks callback_plugins = plugins/callbacks
callback_whitelist = auto_tags callback_whitelist = auto_tags
ansible_managed = *** ANSIBLE MANAGED FILE ***
template: {file}

View File

@ -1,8 +1,6 @@
--- ---
# file: group_vars/all # file: group_vars/all
# this is the standard text to put in templates
ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***\norigin: {file}"
branch: experimental branch: experimental
ppa_owner: 'ppa:yavdr' ppa_owner: 'ppa:yavdr'
# add the following PPAs # add the following PPAs

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
[lircd] [lircd]
nodaemon = False nodaemon = False

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
[lircd] [lircd]
nodaemon = False nodaemon = False

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
#======================= Global Settings ======================= #======================= Global Settings =======================

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
# Activate/deactivate ACPIWakeup with yes/no: # Activate/deactivate ACPIWakeup with yes/no:
ACPI_ENABLED="{% if wakeup_method == 'acpiwakeup' %}yes{% else %}no{% endif %}" ACPI_ENABLED="{% if wakeup_method == 'acpiwakeup' %}yes{% else %}no{% endif %}"

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment('c') }} {{ ansible_managed | comment('c') }}
// Recommends are as of now still abused in many packages // Recommends are as of now still abused in many packages
APT::Install-Recommends "0"; APT::Install-Recommends "0";
APT::Install-Suggests "0"; APT::Install-Suggests "0";

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
exec openbox-session exec openbox-session

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
[Unit] [Unit]
After=x@vt7.service After=x@vt7.service
Wants=x@vt7.service Wants=x@vt7.service

View File

@ -1,4 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed | comment }}
Section "ServerLayout" Section "ServerLayout"
Identifier "Layout0" Identifier "Layout0"