whether there is an analogue set_facts but keeping the difference between 
the plays
register creates a structure, and I would be quite variable.

for what it is to me.
I have in the performance of the play there is a lot of roles with the same 
addictions and these are carried out according to several times resulting 
in no effective implementation of the play.

Using variables I want to make the role of roles executed once for all the 
play.

example

---
- hosts: mail_srv 
  remote_user: an
  sudo: yes

  roles:
    - le9i0nx.base
    - le9i0nx.zram
    - le9i0nx.hp.dl320
    - debops.users
    - debops.console
    - debops.ntp
    - debops.sshd
    - debops.secret
    - debops.mysql
    - le9i0nx.ssl_key
    - le9i0nx.postfixadmin
    - le9i0nx.roundcube
    - le9i0nx.mailweb
    - le9i0nx.dovecot

ansible/roles/debops.mysql/meta/main.yml
---
dependencies:
  - role: debops.secret
  - role: debops.ferm
    ferm_input_list:
      - type: 'dport_accept'
        dport: [ 'mysql' ]
        saddr: '{{ mysql_mysqld_allow }}'
        weight: '50'
        filename: 'mysql_dependency_accept'
  - role: debops.tcpwrappers
    tcpwrappers_allow:
      - daemon: 'mysqld'
        client: '{{ mysql_mysqld_allow }}'
        weight: '50'
        filename: 'mysql_dependency_allow'
        comment: 'Allow remote connections to MySQL server'

ansible/roles/le9i0nx.dovecot/meta/main.yml
---
dependencies:
  - role: debops.secret
  - role: debops.rsyslog
    rsyslog_pools: [ '{{ rsyslog_pool_dovecot }}' ]
    rsyslog_pool_dovecot:
        enabled: True
        name: '01-dovecot'
        options: |
            $template DynFileErr,
"/var/log/%HOSTNAME%/%programname%/%$YEAR%.%$MONTH%.%$DAY%.err"
            if $programname == "dovecot" and $syslogfacility-text == "mail" 
and $syslogseverity-text == "err" then ?DynFileErr
            & stop
  
            $template DynFile,
"/var/log/%HOSTNAME%/%programname%/%$YEAR%.%$MONTH%.%$DAY%.log"
            if $programname == "dovecot" then ?DynFile
            & stop

  - role: debops.ferm
    ferm_input_list:
      - type: 'dport_accept'
        dport: [ 'pop3', 'pop3s','imap2','imaps','sieve' ]
        accept_any: True
        filename: 'dovecot_dependency_accept'
        weight: '20'

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7f611b89-0e76-47c8-bae2-66e934a03693%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to